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.

70 lines
2.3 KiB

  1. ;; Copyright (C) 2010, 2012, 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. ;;; Ruby "rdebug" Debugger tracking a comint or eshell buffer.
  8. (require 'load-relative)
  9. (require-relative-list '(
  10. "../../common/cmds"
  11. "../../common/menu"
  12. "../../common/track"
  13. "../../common/track-mode"
  14. )
  15. "realgud-")
  16. (require-relative-list '("core" "init") "realgud-rdebug-")
  17. (require-relative-list '("../../lang/ruby") "realgud-lang-")
  18. (realgud-track-mode-vars "rdebug")
  19. (declare-function realgud:ruby-populate-command-keys 'realgud-track-lang-ruby)
  20. (declare-function realgud-track-mode 'realgud-track-mode)
  21. (declare-function realgud-track-mode-hook 'realgud-track-mode)
  22. (declare-function realgud-track-mode-setup 'realgud-track-mode)
  23. (declare-function realgud:track-set-debugger 'realgud-track-mode)
  24. (realgud:ruby-populate-command-keys rdebug-track-mode-map)
  25. (defun rdebug-track-mode-hook()
  26. (if rdebug-track-mode
  27. (progn
  28. (use-local-map rdebug-track-mode-map)
  29. (message "using rdebug mode map")
  30. )
  31. (message "rdebug track-mode-hook disable called"))
  32. )
  33. (define-minor-mode rdebug-track-mode
  34. "Minor mode for tracking rdebug source locations inside a process shell via realgud. rdebug is a Ruby debugger.
  35. If called interactively with no prefix argument, the mode is toggled. A prefix argument, captured as ARG, enables the mode if the argument is positive, and disables it otherwise.
  36. \\{rdebug-track-mode-map}
  37. "
  38. :init-value nil
  39. ;; :lighter " rdebug" ;; mode-line indicator from realgud-track is sufficient.
  40. ;; The minor mode bindings.
  41. :global nil
  42. :group 'realgud:rdebug
  43. :keymap rdebug-track-mode-map
  44. (rdebug-track-mode-internal rdebug-track-mode)
  45. )
  46. ;; Broken out as a function for debugging
  47. (defun rdebug-track-mode-internal (&optional arg)
  48. (realgud:track-set-debugger "rdebug")
  49. (if rdebug-track-mode
  50. (progn
  51. (realgud-track-mode-setup 't)
  52. (rdebug-track-mode-hook))
  53. (progn
  54. (setq realgud-track-mode nil)
  55. ))
  56. )
  57. (provide-me "realgud-rdebug-")