all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: "Miha Rihtaršič" <miha@kamnitnik.top>
To: 46727@debbugs.gnu.org
Subject: bug#46727: 27.1; Only the first function from prefix-command-echo-keystrokes-functions is used
Date: Tue, 23 Feb 2021 21:44:29 +0100	[thread overview]
Message-ID: <87wnuy1ple.fsf@miha-pc> (raw)

[-- 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 --]

             reply	other threads:[~2021-02-23 20:44 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-02-23 20:44 Miha Rihtaršič [this message]
2021-02-24 16:42 ` bug#46727: 27.1; Only the first function from prefix-command-echo-keystrokes-functions is used 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

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

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87wnuy1ple.fsf@miha-pc \
    --to=miha@kamnitnik.top \
    --cc=46727@debbugs.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 external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.