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.

79 lines
2.6 KiB

  1. ;; Copyright (C) 2015-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. ;; This program is distributed in the hope that it will be useful,
  8. ;; but WITHOUT ANY WARRANTY; without even the implied warranty of
  9. ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  10. ;; GNU General Public License for more details.
  11. ;; You should have received a copy of the GNU General Public License
  12. ;; along with this program. If not, see <http://www.gnu.org/licenses/>.
  13. ;; Stock Perl Debugger "perldb5" tracking a comint or eshell buffer.
  14. (require 'load-relative)
  15. (require-relative-list '(
  16. "../../common/cmds"
  17. "../../common/menu"
  18. "../../common/track"
  19. "../../common/track-mode"
  20. )
  21. "realgud-")
  22. (require-relative-list '("core" "init") "realgud:perldb-")
  23. (require-relative-list '("../../lang/perl") "realgud-lang-")
  24. (realgud-track-mode-vars "perldb")
  25. (declare-function realgud-perl-populate-command-keys
  26. 'realgud:perldb)
  27. (declare-function realgud-track-mode 'realgud-track-mode)
  28. (declare-function realgud-track-mode-setup realgud-track-mode)
  29. (declare-function realgud:track-set-debugger 'realgud-track-mode)
  30. (realgud-perl-populate-command-keys perldb-track-mode-map )
  31. (defun perldb-track-mode-hook()
  32. (if perldb-track-mode
  33. (progn
  34. (use-local-map perldb-track-mode-map)
  35. (message "using perldb mode map")
  36. )
  37. (message "perldb track-mode-hook disable called"))
  38. )
  39. (define-minor-mode perldb-track-mode
  40. "Minor mode for tracking perl5db source locations inside a process shell via realgud. perl5db is the stock Perl debugger.
  41. If called interactively with no prefix argument, the mode is toggled. A prefix argument, captured as ARG, enables the mode if the argument is positive, and disables it otherwise.
  42. \\{perldb-track-mode-map}
  43. "
  44. :init-value nil
  45. ;; :lighter " perldb" ;; mode-line indicator from realgud-track is sufficient.
  46. ;; The minor mode bindings.
  47. :global nil
  48. :group 'realgud:perldb
  49. :keymap perldb-track-mode-map
  50. (realgud:track-set-debugger "perldb")
  51. (if perldb-track-mode
  52. (progn
  53. (realgud-track-mode-setup 't)
  54. (perldb-track-mode-hook))
  55. (progn
  56. (setq realgud-track-mode nil)
  57. ))
  58. )
  59. ;; Perldb doesn't have stack switching commands.
  60. (define-key perldb-short-key-mode-map
  61. [remap realgud:cmd-newer-frame] 'undefined)
  62. (define-key perldb-short-key-mode-map
  63. [remap realgud:cmd-older-frame] 'undefined)
  64. (provide-me "realgud:perldb-")