Personal emacs config
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

73 lines
2.3 KiB

  1. ;; Copyright (C) 2011, 2014, 2016 Free Software Foundation, Inc
  2. ;; Author: Rocky Bernstein <rocky@gnu.org>
  3. ;; This program is free software; you can redistribute it and/or modify
  4. ;; it under the terms of the GNU General Public License as published by
  5. ;; the Free Software Foundation, either version 3 of the License, or
  6. ;; (at your option) any later version.
  7. ;;; Mode for parsing various kinds of backtraces found in Perl
  8. (require 'load-relative)
  9. (require-relative-list '(
  10. "../../common/cmds"
  11. "../../common/menu"
  12. "../../common/track-mode"
  13. "../../common/backtrack-mode"
  14. )
  15. "realgud-")
  16. (require-relative-list '("core" "init") "realgud:trepanpl-")
  17. (require-relative-list '("../../lang/perl") "realgud-lang-")
  18. (declare-function realgud-goto-line-for-pt
  19. 'realgud-track-mode)
  20. (declare-function realgud-backtrack-set-debugger
  21. 'realgud-common-backtrack-mode)
  22. (declare-function realgud-perl-populate-command-keys
  23. 'realgud-lang-perl)
  24. (realgud-backtrack-mode-vars "trepanpl")
  25. (set-keymap-parent trepanpl-backtrack-mode-map realgud-backtrack-mode-map)
  26. (declare-function realgud-backtrack-mode(bool))
  27. (defun realgud:trepanpl-goto-control-frame-line (pt)
  28. "Display the location mentioned by a control-frame line
  29. described by PT."
  30. (interactive "d")
  31. (realgud-goto-line-for-pt pt "control-frame"))
  32. (realgud-perl-populate-command-keys trepanpl-backtrack-mode-map)
  33. (define-key trepanpl-backtrack-mode-map
  34. (kbd "C-c !c") 'realgud:trepanpl-goto-control-frame-line)
  35. (define-minor-mode trepanpl-backtrack-mode
  36. "Minor mode for tracking ruby debugging inside a file which may not have process shell."
  37. :init-value nil
  38. ;; :lighter " trepanpl" ;; mode-line indicator from realgud-track is sufficient.
  39. ;; The minor mode bindings.
  40. :global nil
  41. :group 'realgud:trepanpl
  42. :keymap trepanpl-backtrack-mode-map
  43. (realgud-backtrack-set-debugger "trepan.pl")
  44. (if trepanpl-backtrack-mode
  45. (progn
  46. (realgud-backtrack-mode 't)
  47. (run-mode-hooks (intern (trepanpl-backtrack-mode-hook))))
  48. (progn
  49. (realgud-backtrack-mode nil)
  50. ))
  51. )
  52. (defun trepanpl-backtrack-mode-hook()
  53. (if trepanpl-backtrack-mode
  54. (progn
  55. (use-local-map trepanpl-backtrack-mode-map)
  56. (message "using trepanpl mode map")
  57. )
  58. (message "trepan.pl backtrack-mode-hook disable called"))
  59. )
  60. (provide-me "realgud:trepanpl-")