Personal emacs config
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

72 lines
2.7 KiB

  1. ;; Copyright (C) 2010-2011, 2013-2016 Free Software Foundation, Inc
  2. ;; Author: Rocky Bernstein <rocky@gnu.org>
  3. ;; This program is free software; you can redistribute it and/or modify
  4. ;; it under the terms of the GNU General Public License as published by
  5. ;; the Free Software Foundation, either version 3 of the License, or
  6. ;; (at your option) any later version.
  7. ;; This program is distributed in the hope that it will be useful,
  8. ;; but WITHOUT ANY WARRANTY; without even the implied warranty of
  9. ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  10. ;; GNU General Public License for more details.
  11. ;; `trepan' Main interface to trepan via Emacs
  12. (require 'load-relative)
  13. (require-relative-list '("../../common/helper") "realgud-")
  14. (require-relative-list '("../../common/run") "realgud:")
  15. (require-relative-list '("core" "track-mode") "realgud:trepan-")
  16. (declare-function realgud:trepan-query-cmdline 'realgud:trepan-core)
  17. (declare-function realgud:trepan-parse-cmd-args 'realgud:trepan-core)
  18. (declare-function realgud:run-debugger 'realgud:run)
  19. ;; This is needed, or at least the docstring part of it is needed to
  20. ;; get the customization menu to work in Emacs 25.
  21. (defgroup realgud:trepan nil
  22. "The realgud interface to the Ruby 1.9.2 1.9.3 \"trepanning\" debugger"
  23. :group 'ruby
  24. :group 'realgud
  25. :version "25.1")
  26. ;; -------------------------------------------------------------------
  27. ;; User-definable variables
  28. ;;
  29. (defcustom realgud:trepan-command-name
  30. ;;"trepan --emacs 3"
  31. "trepan"
  32. "File name for executing the Ruby debugger and command options.
  33. This should be an executable on your path, or an absolute file name."
  34. :type 'string
  35. :group 'realgud:trepan)
  36. ;;;###autoload
  37. (defun realgud:trepan (&optional opt-cmd-line no-reset)
  38. "Invoke the trepan Ruby debugger and start the Emacs user interface.
  39. String OPT-CMD-LINE is treated like a shell string; arguments are
  40. tokenized by `split-string-and-unquote'. The tokenized string is
  41. parsed by `trepan-parse-cmd-args' and path elements found by that
  42. are expanded using `expand-file-name'.
  43. Normally, command buffers are reused when the same debugger is
  44. reinvoked inside a command buffer with a similar command. If we
  45. discover that the buffer has prior command-buffer information and
  46. NO-RESET is nil, then that information which may point into other
  47. buffers and source buffers which may contain marks and fringe or
  48. marginal icons is reset. See `loc-changes-clear-buffer' to clear
  49. fringe and marginal icons.
  50. "
  51. (interactive)
  52. (realgud:run-debugger "trepan" 'realgud:trepan-query-cmdline
  53. 'realgud:trepan-parse-cmd-args
  54. 'realgud:trepan-minibuffer-history
  55. opt-cmd-line no-reset)
  56. )
  57. ;;;###autoload
  58. (defalias 'trepan 'realgud:trepan)
  59. (provide-me "realgud-")
  60. ;;; trepan.el ends here