emacs-diffs
[Top][All Lists]
Advanced

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

emacs-29 01b65d442ad: Autoload Eglot helper funtion eglot--debbugs-or-gi


From: João Távora
Subject: emacs-29 01b65d442ad: Autoload Eglot helper funtion eglot--debbugs-or-github-bug-uri
Date: Thu, 9 Mar 2023 08:05:32 -0500 (EST)

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

    Autoload Eglot helper funtion eglot--debbugs-or-github-bug-uri
    
    This isn't a typical autoload: the progn block is plced in the
    autoloads file, but the eglot.el file itself isn't loaded as a result
    when the function inside the progn block is called.
    
    * lisp/progmodes/eglot.el (eglot--debbugs-or-github-bug-uri):
    autoload, but in progn.
---
 lisp/progmodes/eglot.el | 15 ++++++++-------
 1 file changed, 8 insertions(+), 7 deletions(-)

diff --git a/lisp/progmodes/eglot.el b/lisp/progmodes/eglot.el
index 2491c86ea5b..2679773c117 100644
--- a/lisp/progmodes/eglot.el
+++ b/lisp/progmodes/eglot.el
@@ -3666,13 +3666,14 @@ If NOERROR, return predicate, else erroring function."
 
 ;;; 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)
-
+;;;###autoload
+(progn
+  (put 'eglot--debbugs-or-github-bug-uri 'bug-reference-url-format t)
+  (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))))
 ;;; Obsolete
 ;;;
 



reply via email to

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