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.4 KiB

  1. ;; Copyright (C) 2012-2016 Free Software Foundation, Inc
  2. ;; Author: Free Software Foundation, Inc
  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. ;; Author: Rocky Bernstein <rocky@gnu.org>
  12. ;; Bash Debugger tracking in a comint or eshell buffer.
  13. (require 'load-relative)
  14. (require-relative-list '(
  15. "../../common/cmds"
  16. "../../common/menu"
  17. "../../common/track"
  18. "../../common/track-mode"
  19. )
  20. "realgud-")
  21. (require-relative-list '("core" "init") "realgud:bashdb-")
  22. (require-relative "../../lang/posix-shell" nil "realgud-lang-")
  23. (declare-function realgud-track-mode 'realgud-track-mode)
  24. (declare-function realgud-track-mode-hook 'realgud-track-mode)
  25. (declare-function realgud-track-mode-setup 'realgud-track-mode)
  26. (declare-function realgud:track-set-debugger 'realgud-track-mode)
  27. (declare-function realgud-posix-shell-populate-command-keys
  28. 'realgud-lang-posix-shell)
  29. (realgud-track-mode-vars "bashdb")
  30. (defun bashdb-track-mode-hook()
  31. (if bashdb-track-mode
  32. (progn
  33. (use-local-map bashdb-track-mode-map)
  34. (message "using bashdb mode map")
  35. )
  36. (message "bashdb track-mode-hook disable called"))
  37. )
  38. (define-minor-mode bashdb-track-mode
  39. "Minor mode for tracking bashdb source locations inside a process shell via realgud. bashdb is a Bash debugger. See URL `http://bashdb.sf.net'.
  40. 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.
  41. \\{bashdb-track-mode-map}"
  42. :init-value nil
  43. ;; :lighter " bashdb" ;; mode-line indicator from realgud-track is sufficient.
  44. ;; The minor mode bindings.
  45. :global nil
  46. :group 'realgud:bashdb
  47. :keymap bashdb-track-mode-map
  48. (realgud:track-set-debugger "bashdb")
  49. (if bashdb-track-mode
  50. (progn
  51. (realgud-track-mode-setup 't)
  52. (bashdb-track-mode-hook))
  53. (progn
  54. (setq realgud-track-mode nil)
  55. ))
  56. )
  57. (define-key bashdb-short-key-mode-map "T" 'realgud:cmd-backtrace)
  58. (provide-me "realgud:bashdb-")