]> code.delx.au - gnu-emacs-elpa/blob - packages/realgud/realgud/debugger/perldb/perldb.el
6d5bcf4eb329b2891ea56559dafe0fc6b777d576
[gnu-emacs-elpa] / packages / realgud / realgud / debugger / perldb / perldb.el
1 ;;; Copyright (C) 2011, 2014-2015 Rocky Bernstein <rocky@gnu.org>
2 ;; `perldb' Main interface to perl debugger 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:perldb-")
7
8 (declare-function realgud:run-debugger 'realgud:run)
9
10 ;; This is needed, or at least the docstring part of it is needed to
11 ;; get the customization menu to work in Emacs 24.
12 (defgroup realgud:perldb nil
13 "The realgud interface to the Perl debugger, perldb"
14 :group 'realgud
15 :version "24.1")
16
17 ;; -------------------------------------------------------------------
18 ;; User-definable variables
19 ;;
20
21 (defcustom realgud:perldb-command-name
22 "perl -d"
23 "Option to needed to run the Perl debugger"
24 :type 'string
25 :group 'realgud:perldb)
26
27 ;; -------------------------------------------------------------------
28 ;; The end.
29 ;;
30
31 (declare-function perldb-track-mode (bool))
32 (declare-function realgud:perldb-query-cmdline 'realgud:perldb-core)
33 (declare-function realgud:perldb-parse-cmd-args 'realgud:perldb-core)
34
35 ;;;###autoload
36 (defun realgud:perldb (&optional opt-cmd-line no-reset)
37 "Invoke the Perl debugger and start the Emacs user interface.
38
39 String OPT-CMD-LINE specifies how to run nodejs.
40
41 OPT-CMD-LINE is treated like a shell string; arguments are
42 tokenized by `split-string-and-unquote'. The tokenized string is
43 parsed by `perldb-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 "perldb"
56 'realgud:perldb-query-cmdline
57 'realgud:perldb-parse-cmd-args
58 'realgud:perldb-minibuffer-history
59 opt-cmd-line no-reset))
60
61 (defalias 'perl5db 'realgud:perldb)
62 ;; (defalias 'perldb 'realgud:perldb)
63
64 (provide-me "realgud-")