diff options
author | João Távora <joaotavora@gmail.com> | 2023-03-01 13:24:07 +0000 |
---|---|---|
committer | João Távora <joaotavora@gmail.com> | 2023-03-01 13:27:06 +0000 |
commit | 0a4b1c0102d4062d24e19340f863b9df25e07ab3 (patch) | |
tree | 28d916a529a8320ab3b945d1ea05fb21f408b300 | |
parent | 40c9fc8e3b3f55c9122b95e21660b5709109bd1a (diff) | |
download | emacs-0a4b1c0102d4062d24e19340f863b9df25e07ab3.tar.gz emacs-0a4b1c0102d4062d24e19340f863b9df25e07ab3.tar.bz2 emacs-0a4b1c0102d4062d24e19340f863b9df25e07ab3.zip |
; Eglot: improve bug-reference-url-format/bug-reference-url-regexp
* lisp/progmodes/eglot.el (eglot--debbugs-or-github-bug-uri): New helper.
-rw-r--r-- | lisp/progmodes/eglot.el | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/lisp/progmodes/eglot.el b/lisp/progmodes/eglot.el index 119b4f64c8d..36aafac8938 100644 --- a/lisp/progmodes/eglot.el +++ b/lisp/progmodes/eglot.el @@ -3662,6 +3662,15 @@ If NOERROR, return predicate, else erroring function." (add-to-list 'desktop-minor-mode-handlers '(eglot--managed-mode . ignore))) +;;; Misc +;;; +(defun eglot--debbugs-or-github-bug-uri () + (format (if (string= (match-string 2) "github") + "https://github.com/joaotavora/eglot/issues/%s" + "https://debbugs.gnu.org/%s") + (match-string 3))) +(put 'eglot--debbugs-or-github-bug-uri 'bug-reference-url-format t) + ;;; Obsolete ;;; @@ -3671,8 +3680,8 @@ If NOERROR, return predicate, else erroring function." ;; Local Variables: -;; bug-reference-bug-regexp: "\\(github#\\([0-9]+\\)\\)" -;; bug-reference-url-format: "https://github.com/joaotavora/eglot/issues/%s" +;; bug-reference-bug-regexp: "\\(\\(github\\|bug\\)#\\([0-9]+\\)\\)" +;; bug-reference-url-format: eglot--debbugs-or-github-bug-uri ;; checkdoc-force-docstrings-flag: nil ;; End: |