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.4 KiB

  1. ;; Copyright (C) 2011, 2014-2017, 2019 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. ;; `perldb' Main interface to perl debugger via Emacs
  8. (require 'load-relative)
  9. (require-relative-list '("../../common/helper") "realgud-")
  10. (require-relative-list '("../../common/run") "realgud:")
  11. (require-relative-list '("core" "track-mode") "realgud:perldb-")
  12. (declare-function realgud:run-debugger 'realgud:run)
  13. ;; This is needed, or at least the docstring part of it is needed to
  14. ;; get the customization menu to work in Emacs 24.
  15. (defgroup realgud:perldb nil
  16. "The realgud interface to the Perl debugger, perldb"
  17. :group 'realgud
  18. :version "25.1")
  19. ;; -------------------------------------------------------------------
  20. ;; User-definable variables
  21. ;;
  22. (defcustom realgud:perldb-command-name
  23. "perl -d"
  24. "Option to needed to run the Perl debugger"
  25. :type 'string
  26. :group 'realgud:perldb)
  27. ;; -------------------------------------------------------------------
  28. ;; The end.
  29. ;;
  30. (declare-function realgud:perldb-query-cmdline 'realgud:perldb-core)
  31. (declare-function realgud:perldb-parse-cmd-args 'realgud:perldb-core)
  32. ;;;###autoload
  33. (defun realgud:perldb (&optional opt-cmd-line no-reset)
  34. "Invoke the Perl debugger and start the Emacs user interface.
  35. String OPT-CMD-LINE specifies how to run perldb.
  36. OPT-CMD-LINE is treated like a shell string; arguments are
  37. tokenized by `split-string-and-unquote'. The tokenized string is
  38. parsed by `perldb-parse-cmd-args' and path elements found by that
  39. are expanded using `realgud:expand-file-name-if-exists'.
  40. Normally, command buffers are reused when the same debugger is
  41. reinvoked inside a command buffer with a similar command. If we
  42. discover that the buffer has prior command-buffer information and
  43. NO-RESET is nil, then that information which may point into other
  44. buffers and source buffers which may contain marks and fringe or
  45. marginal icons is reset. See `loc-changes-clear-buffer' to clear
  46. fringe and marginal icons.
  47. "
  48. (interactive)
  49. (realgud:run-debugger "perldb"
  50. 'realgud:perldb-query-cmdline
  51. 'realgud:perldb-parse-cmd-args
  52. 'realgud:perldb-minibuffer-history
  53. opt-cmd-line no-reset))
  54. ;; (defalias 'perldb 'realgud:perldb)
  55. (provide-me "realgud-")