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-")
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"
17 ;; -------------------------------------------------------------------
18 ;; User definable variables
21 (defcustom realgud:trepanpl-command-name
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."
26 :group 'realgud:trepanpl)
28 ;; -------------------------------------------------------------------
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)
38 (defun realgud:trepan.pl (&optional opt-cmd-line no-reset)
39 "Invoke the trepan.pl Perl debugger and start the Emacs user interface.
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.
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'.
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.
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))
63 (defalias 'trepan.pl 'realgud:trepan.pl)
64 (provide-me "realgud-")
65 ;;; trepanpl.el ends here