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.

48 lines
1.7 KiB

  1. ;; Copyright (C) 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. ;; 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. ;;; Common Java constants and regular expressions.
  14. (require 'load-relative)
  15. (require-relative-list '("../common/regexp" "../common/loc" "../common/track")
  16. "realgud-")
  17. (declare-function realgud-goto-line-for-pt 'realgud-track)
  18. (declare-function make-realgud-loc-pat 'realgud-regexp)
  19. (defun realgud-java-populate-command-keys (&optional map)
  20. "Bind the debugger function key layout used by many debuggers.
  21. \\{realgud-example-map-standard}"
  22. (define-key map (kbd "C-c !m") 'realgud:goto-maven-errmsg-line)
  23. )
  24. (defconst realgud-maven-error-loc-pat
  25. (make-realgud-loc-pat
  26. :regexp "^\\[\\(?:ERROR\\|WARNING\\)\\] \\(.*\\):\\[\\([0-9][0-9]*\\),\\([0-9][0-9]*\\)\\]"
  27. :file-group 1
  28. :line-group 2
  29. :char-offset-group 3)
  30. "A realgud-loc-pat struct that describes a maven error or warning line"
  31. )
  32. (defun realgud:goto-maven-errmsg-line (pt)
  33. "Display the location mentioned by the maven error at PT."
  34. (interactive "d")
  35. (realgud-goto-line-for-pt pt "maven-error"))
  36. (provide-me "realgud-lang-")