1 ;;; Copyright (C) 2010, 2012-2015 Rocky Bernstein <rocky@gnu.org>
2 ;;; Python "pdb" Debugger tracking a comint 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:pdb-")
15 (realgud-track-mode-vars "pdb")
17 (declare-function realgud-track-mode 'realgud-track-mode)
18 (declare-function realgud-track-mode-setup 'realgud-track-mode)
19 (declare-function realgud:track-set-debugger 'realgud-track-mode)
20 (declare-function realgud-python-populate-command-keys 'realgud-lang-python)
22 (realgud-python-populate-command-keys pdb-track-mode-map)
24 (defun pdb-track-mode-hook()
27 (use-local-map pdb-track-mode-map)
28 (message "using pdb mode map")
30 (message "pdb track-mode-hook disable called")
34 (define-minor-mode pdb-track-mode
35 "Minor mode for tracking pdb source locations inside a process shell via realgud. pdb is the stock Python 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.
41 \\{pdb-track-mode-map}
44 ;; :lighter " pdb" ;; mode-line indicator from realgud-track is sufficient.
45 ;; The minor mode bindings.
48 :keymap pdb-track-mode-map
49 (realgud:track-set-debugger "pdb")
52 (realgud-track-mode-setup 't)
53 (pdb-track-mode-hook))
55 (setq realgud-track-mode nil)
59 (provide-me "realgud:pdb-")