1 ;;; Copyright (C) 2012, 2014-2015 Rocky Bernstein <rocky@gnu.org>
2 ;;; "kshdb" Debugger tracking a comint or eshell buffer.
4 (eval-when-compile (require 'cl))
5 (require 'load-relative)
6 (require-relative-list '(
10 "../../common/track-mode"
13 (require-relative-list '("core" "init") "realgud:kshdb-")
15 (declare-function realgud:track-set-debugger 'realgud-track-mode)
16 (declare-function realgud-track-mode-setup 'realgud-track-mode)
17 (declare-function realgud-posix-shell-populate-command-keys
18 'realgud-lang-posix-shell)
20 (realgud-track-mode-vars "kshdb")
21 (realgud-posix-shell-populate-command-keys kshdb-track-mode-map)
23 (declare-function realgud-track-mode(bool))
25 (defun kshdb-track-mode-hook()
28 (use-local-map kshdb-track-mode-map)
29 (message "using kshdb mode map")
31 (message "kshdb track-mode-hook disable called"))
34 (define-minor-mode kshdb-track-mode
35 "Minor mode for tracking kshdb source locations inside a process shell via realgud. kshdb is a Korn Shell debugger.
37 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.
39 \\{kshdb-track-mode-map}
42 ;; :lighter " kshdb" ;; mode-line indicator from realgud-track is sufficient.
43 ;; The minor mode bindings.
46 :keymap kshdb-track-mode-map
48 (realgud:track-set-debugger "kshdb")
51 (realgud-track-mode 't)
52 (kshdb-track-mode-hook))
54 (realgud-track-mode nil)
58 (provide-me "realgud:kshdb-")