]> git.eshelyaron.com Git - emacs.git/commitdiff
Autoload Eglot helper funtion eglot--debbugs-or-github-bug-uri
authorJoão Távora <joaotavora@gmail.com>
Thu, 9 Mar 2023 13:07:02 +0000 (13:07 +0000)
committerJoão Távora <joaotavora@gmail.com>
Thu, 9 Mar 2023 13:07:02 +0000 (13:07 +0000)
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

index 2491c86ea5b9474f4af2f057ac0ed583729d23c9..2679773c11784cf15c6f27c0ffc068ade15eab7e 100644 (file)
@@ -3666,13 +3666,14 @@ If NOERROR, return predicate, else erroring function."
 \f
 ;;; 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)
-\f
+;;;###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
 ;;;