1 ;;; Copyright (C) 2010, 2012, 2014-2015 Rocky Bernstein <rocky@gnu.org>
2 ;;; Python "pydb" Debugger tracking a comint
5 (eval-when-compile (require 'cl))
6 (require 'load-relative)
7 (require-relative-list '(
11 "../../common/track-mode"
14 (require-relative-list '("core" "init") "realgud:pydb-")
16 (realgud-track-mode-vars "pydb")
18 (declare-function realgud-track-mode 'realgud-track-mode)
19 (declare-function realgud-track-mode-setup 'realgud-track-mode)
20 (declare-function realgud:track-set-debugger 'realgud-track-mode)
21 (declare-function realgud-python-populate-command-keys 'realgud-lang-python)
23 (realgud-python-populate-command-keys pydb-track-mode-map)
25 (defun pydb-track-mode-hook()
28 (use-local-map pydb-track-mode-map)
29 (message "using pydb mode map")
31 (message "pydb track-mode-hook disable called")
35 (define-minor-mode pydb-track-mode
36 "Minor mode for tracking pydb source locations inside a process shell via realgud. pydb is a Python debugger.
38 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.
40 \\{pydb-track-mode-map}
43 ;; :lighter " pydb" ;; mode-line indicator from realgud-track is sufficient.
44 ;; The minor mode bindings.
47 :keymap pydb-track-mode-map
48 (realgud:track-set-debugger "pydb")
51 (realgud-track-mode-setup 't)
52 (pydb-track-mode-hook))
54 (setq realgud-track-mode nil)
58 (provide-me "realgud:pydb-")