unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Lars Ingebrigtsen <larsi@gnus.org>
To: "Miha Rihtaršič" <miha@kamnitnik.top>
Cc: 46727@debbugs.gnu.org
Subject: bug#46727: 27.1; Only the first function from prefix-command-echo-keystrokes-functions is used
Date: Wed, 24 Feb 2021 17:42:03 +0100	[thread overview]
Message-ID: <87wnux76zo.fsf@gnus.org> (raw)
In-Reply-To: <87wnuy1ple.fsf@miha-pc> ("Miha Rihtaršič"'s message of "Tue, 23 Feb 2021 21:44:29 +0100")

Miha Rihtaršič <miha@kamnitnik.top> writes:

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

[...]

>              (run-hook-wrapped 'prefix-command-echo-keystrokes-functions
> -                              (lambda (fun) (push (funcall fun) strs)))
> +                              (lambda (fun) (push (funcall fun) strs) nil))

Thanks.

I poked around in the code, and I think your interpretation here must be
correct, and I've applied your patch to Emacs 28.  (Besides, `push' has
an undefined return value...  and always returns non-nil, so the old
code would, as you said, never use more than the first function in
`prefix-command-echo-keystrokes-functions'.)

This change was small enough to apply without assigning copyright to the
FSF, but for future patches you want to submit, it might make sense to
get the paperwork started now, so that subsequent patches can be applied
speedily. Would you be willing to sign such paperwork?

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no





  reply	other threads:[~2021-02-24 16:42 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
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 [this message]
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

  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=87wnux76zo.fsf@gnus.org \
    --to=larsi@gnus.org \
    --cc=46727@debbugs.gnu.org \
    --cc=miha@kamnitnik.top \
    /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).