From 01b65d442ad681e6fef0db76451e668125a17038 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Jo=C3=A3o=20T=C3=A1vora?= Date: Thu, 9 Mar 2023 13:07:02 +0000 Subject: [PATCH] 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 ;;; -- 2.39.2