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