From: "João Távora" <joaotavora@gmail.com>
To: Eli Zaretskii <eliz@gnu.org>
Cc: emacs-devel@gnu.org
Subject: Re: Unsafe local variable in eglot.el
Date: Thu, 9 Mar 2023 11:24:37 +0000 [thread overview]
Message-ID: <CALDnm51OD28asXRv+9gnhTMvqPSm54=at2N8TPRz5_acOqOALg@mail.gmail.com> (raw)
In-Reply-To: <CALDnm53gZH5igi6M0mBqt9o7go16STaf2=ynoCDBYQXBS7RrVA@mail.gmail.com>
On Thu, Mar 9, 2023 at 9:31 AM João Távora <joaotavora@gmail.com> wrote:
> But curiously, this doesn't reproduce it
>
> src/emacs -Q
> C-h f eglot RET
> C-x o TAB RET ;; to visit the "eglot.el" link
>
> Why is that?
It's probably because C-h v loads the file to show the
docstring (did it always do that?)
>
> Maybe the function can be autoloaded?
I played a bit and this patch seems to fix it. Can you test?
diff --git a/lisp/progmodes/eglot.el b/lisp/progmodes/eglot.el
index 2491c86ea5b..94cc86d1e97 100644
--- a/lisp/progmodes/eglot.el
+++ b/lisp/progmodes/eglot.el
@@ -3666,12 +3666,14 @@ eglot-inlay-hints-mode
;;; 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
;;;
next prev parent reply other threads:[~2023-03-09 11:24 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-03-09 8:00 Unsafe local variable in eglot.el Eli Zaretskii
2023-03-09 9:31 ` João Távora
2023-03-09 11:24 ` João Távora [this message]
2023-03-09 12:19 ` Eli Zaretskii
2023-03-09 13:07 ` João Távora
2023-03-09 15:54 ` Eli Zaretskii
2023-03-09 11:56 ` Eli Zaretskii
2023-03-09 12:10 ` Tassilo Horn
2023-03-09 13:12 ` João Távora
2023-03-10 7:44 ` Tassilo Horn
2023-03-09 12:19 ` João Távora
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to='CALDnm51OD28asXRv+9gnhTMvqPSm54=at2N8TPRz5_acOqOALg@mail.gmail.com' \
--to=joaotavora@gmail.com \
--cc=eliz@gnu.org \
--cc=emacs-devel@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).