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.

85 lines
3.3 KiB

  1. ;; Copyright (C) 2015-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. ;; You should have received a copy of the GNU General Public License
  12. ;; along with this program. If not, see <http://www.gnu.org/licenses/>.
  13. ;;; Regular expressions for nodejs Javascript debugger.
  14. ;; `trepanjs' Main interface to trepanjs via Emacs
  15. (require 'load-relative)
  16. (require-relative-list '("../../common/helper") "realgud-")
  17. (require-relative-list '("../../common/run") "realgud:")
  18. (require-relative-list '("../../common/utils") "realgud-")
  19. (require-relative-list '("core" "track-mode") "realgud:trepanjs-")
  20. (require-relative-list '("../../lang/js") "realgud-lang-")
  21. (declare-function realgud:trepanjs-query-cmdline 'realgud:trepanjs-core)
  22. (declare-function realgud:trepanjs-parse-cmd-args 'realgud:trepanjs-core)
  23. (declare-function realgud:run-debugger 'realgud:run)
  24. ;; This is needed, or at least the docstring part of it is needed to
  25. ;; get the customization menu to work in Emacs 25.
  26. (defgroup realgud:trepanjs nil
  27. "The realgud interface to the Ruby 1.9.2 1.9.3 \"trepanjsning\" debugger"
  28. :group 'ruby
  29. :group 'realgud
  30. :version "25.1")
  31. ;; -------------------------------------------------------------------
  32. ;; User-definable variables
  33. ;;
  34. (defcustom realgud:trepanjs-command-name
  35. ;;"trepanjs --emacs 3"
  36. "trepanjs"
  37. "File name for executing the Ruby debugger and command options.
  38. This should be an executable on your path, or an absolute file name."
  39. :type 'string
  40. :group 'realgud:trepanjs)
  41. ;;;###autoload
  42. (defun realgud:trepanjs (&optional opt-cmd-line no-reset)
  43. "Invoke the trepanjs Ruby debugger and start the Emacs user interface.
  44. String 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 `trepanjs-parse-cmd-args' and path elements found by that
  47. are expanded using `expand-file-name'.
  48. Normally, command buffers are reused when the same debugger is
  49. reinvoked inside a command buffer with a similar command. If we
  50. discover that the buffer has prior command-buffer information and
  51. NO-RESET is nil, then that information which may point into other
  52. buffers and source buffers which may contain marks and fringe or
  53. marginal icons is reset. See `loc-changes-clear-buffer' to clear
  54. fringe and marginal icons.
  55. "
  56. (interactive)
  57. (let ((cmd-buf
  58. (realgud:run-debugger "trepanjs" 'realgud:trepanjs-query-cmdline
  59. 'realgud:trepanjs-parse-cmd-args
  60. 'realgud:trepanjs-minibuffer-history
  61. opt-cmd-line no-reset)))
  62. ;; (if cmd-buf
  63. ;; (with-current-buffer cmd-buf
  64. ;; ;; FIXME should allow customization whether to do or not
  65. ;; ;; and also only do if hook is not already there.
  66. ;; (realgud:remove-ansi-schmutz)
  67. ;; )
  68. ;; )
  69. ))
  70. (defalias 'trepanjs 'realgud:trepanjs)
  71. (provide-me "realgud-")
  72. ;;; trepanjs.el ends here