]> code.delx.au - gnu-emacs-elpa/blob - packages/realgud/realgud/debugger/pydb/pydb.el
Add 'packages/realgud/' from commit 'd811316e6a0f4eeee8a1347f504c196c86baa2cb'
[gnu-emacs-elpa] / packages / realgud / realgud / debugger / pydb / pydb.el
1 ;;; Copyright (C) 2012, 2014 Rocky Bernstein <rocky@gnu.org>
2 ;; `pydb' Main interface to pydb via Emacs
3 (require 'load-relative)
4 (require-relative-list '("../../common/helper") "realgud-")
5 (require-relative-list '("../../common/run") "realgud:")
6 (require-relative-list '("core" "track-mode") "realgud:pydb-")
7
8 (declare-function pydb-query-cmdline 'realgud:pydb-core)
9 (declare-function pydb-parse-cmd-args 'realgud:pydb-core)
10 (declare-function realgud:run-debugger 'realgud:run)
11
12 ;; This is needed, or at least the docstring part of it is needed to
13 ;; get the customization menu to work in Emacs 24.
14 (defgroup realgud:pydb nil
15 "The realgud interface to the Python pydb debugger"
16 :group 'realgud
17 :group 'python
18 :version "24.1")
19
20 ;; -------------------------------------------------------------------
21 ;; User-definable variables
22 ;;
23
24 (defcustom realgud:pydb-command-name
25 "pydb"
26 "File name for executing the stock Python debugger and command options.
27 This should be an executable on your path, or an absolute file name."
28 :type 'string
29 :group 'realgud:pydb)
30
31 (declare-function pydb-track-mode (bool))
32
33 ;; -------------------------------------------------------------------
34 ;; The end.
35 ;;
36
37 ;;;###autoload
38 (defun realgud:pydb (&optional opt-cmd-line no-reset)
39 "Invoke the pydb Python debugger and start the Emacs user interface.
40
41 OPT-COMMAND-LINE is treated like a shell string; arguments are
42 tokenized by `split-string-and-unquote'. The tokenized string is
43 parsed by `pydb-parse-cmd-args' and path elements found by that
44 are expanded using `realgud:expand-file-name-if-exists'.
45
46 Normally, command buffers are reused when the same debugger is
47 reinvoked inside a command buffer with a similar command. If we
48 discover that the buffer has prior command-buffer information and
49 NO-RESET is nil, then that information which may point into other
50 buffers and source buffers which may contain marks and fringe or
51 marginal icons is reset. See `loc-changes-clear-buffer' to clear
52 fringe and marginal icons.
53 "
54 (interactive)
55 (realgud:run-debugger "pydb" 'pydb-query-cmdline 'pydb-parse-cmd-args
56 'realgud:pydb-minibuffer-history
57 opt-cmd-line no-reset)
58 )
59
60
61 (defalias 'pydb 'realgud:pydb)
62
63 (provide-me "realgud-")