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