GNU bug report logs - #76341
31.0.50; Confusing prompt after C-q

Previous Next

Package: emacs;

Reported by: Mauro Aranda <maurooaranda <at> gmail.com>

Date: Sun, 16 Feb 2025 15:59:01 UTC

Severity: minor

Found in version 31.0.50

Done: Stefan Monnier <monnier <at> iro.umontreal.ca>

Bug is archived. No further changes may be made.

Full log


Message #16 received at 76341 <at> debbugs.gnu.org (full text, mbox):

From: Stefan Monnier <monnier <at> iro.umontreal.ca>
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: 76341 <at> debbugs.gnu.org, Mauro Aranda <maurooaranda <at> gmail.com>
Subject: Re: bug#76341: 31.0.50; Confusing prompt after C-q
Date: Sat, 22 Feb 2025 09:41:25 -0500
> Stefan, do you see a cleaner fix?  I didn't want to test the key
> itself for being [nil], since perhaps it could be [foo bar nil] or
> somesuch?  IOW, what possible forms of key could cause key-description
> produce "<nil>" for its argument?

We call `vector` ourselves with a single arg, so it has to be
a one-element vector, no?

I don't really understand all this code, but looking at the immediate
problem, I'd go with a patch like the one below.


        Stefan


diff --git a/lisp/help.el b/lisp/help.el
index eed52dadf24..48401b8f6dd 100644
--- a/lisp/help.el
+++ b/lisp/help.el
@@ -2198,9 +2198,8 @@
                                    (current-active-maps t)))))
     (catch 'res
       (dolist (val help-event-list)
-        (let ((key (vector (if (eql val 'help)
-                               help-char
-                             val))))
+        (when (setq val (if (eql val 'help) help-char val))
+          (let ((key (vector val)))
           (unless (seq-find (lambda (map) (and (keymapp map) (lookup-key map key)))
                             bindings)
             (throw 'res
@@ -2209,7 +2208,7 @@
                     (substitute-command-keys
                      (format
                       " (\\`%s' for help)"
-                      (key-description key))))))))
+                        (key-description key)))))))))
       str)))
 
 





This bug report was last modified 143 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.