emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

emacs-29 0a4b1c0102d: ; Eglot: improve bug-reference-url-format/bug-refe


From: João Távora
Subject: emacs-29 0a4b1c0102d: ; Eglot: improve bug-reference-url-format/bug-reference-url-regexp
Date: Wed, 1 Mar 2023 08:27:35 -0500 (EST)

branch: emacs-29
commit 0a4b1c0102d4062d24e19340f863b9df25e07ab3
Author: João Távora <joaotavora@gmail.com>
Commit: João Távora <joaotavora@gmail.com>

    ; Eglot: improve bug-reference-url-format/bug-reference-url-regexp
    
    * lisp/progmodes/eglot.el (eglot--debbugs-or-github-bug-uri): New helper.
---
 lisp/progmodes/eglot.el | 13 +++++++++++--
 1 file 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:
 



reply via email to

[Prev in Thread] Current Thread [Next in Thread]