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.

72 lines
2.3 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. ;;; "kshdb" Debugger 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:kshdb-")
  23. (declare-function realgud:track-set-debugger 'realgud-track-mode)
  24. (declare-function realgud-track-mode-setup 'realgud-track-mode)
  25. (declare-function realgud-posix-shell-populate-command-keys
  26. 'realgud-lang-posix-shell)
  27. (realgud-track-mode-vars "kshdb")
  28. (realgud-posix-shell-populate-command-keys kshdb-track-mode-map)
  29. (declare-function realgud-track-mode(bool))
  30. (defun kshdb-track-mode-hook()
  31. (if kshdb-track-mode
  32. (progn
  33. (use-local-map kshdb-track-mode-map)
  34. (message "using kshdb mode map")
  35. )
  36. (message "kshdb track-mode-hook disable called"))
  37. )
  38. (define-minor-mode kshdb-track-mode
  39. "Minor mode for tracking kshdb source locations inside a process shell via realgud. kshdb is a Korn Shell debugger.
  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. \\{kshdb-track-mode-map}
  42. "
  43. :init-value nil
  44. ;; :lighter " kshdb" ;; mode-line indicator from realgud-track is sufficient.
  45. ;; The minor mode bindings.
  46. :global nil
  47. :group 'kshdb
  48. :keymap kshdb-track-mode-map
  49. (realgud:track-set-debugger "kshdb")
  50. (if kshdb-track-mode
  51. (progn
  52. (realgud-track-mode 't)
  53. (kshdb-track-mode-hook))
  54. (progn
  55. (realgud-track-mode nil)
  56. ))
  57. )
  58. (provide-me "realgud:kshdb-")