unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
* bug#46727: 27.1; Only the first function from prefix-command-echo-keystrokes-functions is used
@ 2021-02-23 20:44 Miha Rihtaršič
  2021-02-24 16:42 ` Lars Ingebrigtsen
  0 siblings, 1 reply; 5+ messages in thread
From: Miha Rihtaršič @ 2021-02-23 20:44 UTC (permalink / raw)
  To: 46727

[-- Attachment #1: Type: text/plain, Size: 944 bytes --]


Greetings.

Looking at the function internal-echo-keystrokes-prefix, it is heavily
implied that all functions from
`prefix-command-echo-keystrokes-functions` should be used and their
return values concatenated. This isn't the case, however, because
`run-hook-wrapped` aborts on first non-nil returned value. The following
simple patch fixes this.

diff --git a/lisp/simple.el b/lisp/simple.el
index 1dfc3374ad..403861351c 100644
--- a/lisp/simple.el
+++ b/lisp/simple.el
@@ -4670,7 +4670,7 @@ internal-echo-keystrokes-prefix
     (setq prefix-command--last-echo
           (let ((strs nil))
             (run-hook-wrapped 'prefix-command-echo-keystrokes-functions
-                              (lambda (fun) (push (funcall fun) strs)))
+                              (lambda (fun) (push (funcall fun) strs) nil))
             (setq strs (delq nil strs))
             (when strs (mapconcat #'identity strs " "))))))
 


[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 861 bytes --]

^ permalink raw reply related	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2021-02-24 20:01 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-02-23 20:44 bug#46727: 27.1; Only the first function from prefix-command-echo-keystrokes-functions is used Miha Rihtaršič
2021-02-24 16:42 ` Lars Ingebrigtsen
2021-02-24 19:19   ` Basil L. Contovounesios
2021-02-24 19:33     ` Lars Ingebrigtsen
2021-02-24 20:01       ` Basil L. Contovounesios

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).