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