all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Eli Zaretskii <eliz@gnu.org>
To: Spencer Baugh <sbaugh@janestreet.com>,
	Stefan Monnier <monnier@iro.umontreal.ca>
Cc: 67046@debbugs.gnu.org
Subject: bug#67046: 29.1.50; map-y-or-n-p infinite loops if it's at the end of a kmacro
Date: Fri, 10 Nov 2023 20:55:48 +0200	[thread overview]
Message-ID: <83il69xwsr.fsf@gnu.org> (raw)
In-Reply-To: <ier8r75ftcn.fsf@janestreet.com> (message from Spencer Baugh on Fri, 10 Nov 2023 11:47:36 -0500)

> From: Spencer Baugh <sbaugh@janestreet.com>
> Date: Fri, 10 Nov 2023 11:47:36 -0500
> 
> >From d7aa9644b308a936926b1074d0f6eac3e425b011 Mon Sep 17 00:00:00 2001
> From: Spencer Baugh <sbaugh@janestreet.com>
> Date: Fri, 10 Nov 2023 11:27:10 -0500
> Subject: [PATCH] Don't infinite loop in map-y-or-n-p if at the end of kmacro
> 
> Previously, if map-y-or-n-p got -1 from read-event (indicating no
> input due to the end of a keyboard macro), it would just infinite
> loop.
> 
> Now it behaves like other commands which use read-event/read-char/etc,
> and just errors when we try to look up -1 in our keymap and find
> nothing.
> 
> Also, just for the sake of users, print a slightly prettier message
> when this happens.
> 
> * lisp/emacs-lisp/map-ynp.el (map-y-or-n-p): Don't loop if we reach
> the end of a keyboard macro.  (Bug#67046)

You have removed the loop, so now the "try again" part is no longer
working.  How can we be sure this doesn't introduce some regression?
Do you understand why this loop was added, in commit 3f72fac865?  If
so, can you explain why it was needed?

I have added Stefan to the discussion.





  reply	other threads:[~2023-11-10 18:55 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-11-10 16:43 bug#67046: 29.1.50; map-y-or-n-p infinite loops if it's at the end of a kmacro Spencer Baugh
2023-11-10 16:47 ` Spencer Baugh
2023-11-10 18:55   ` Eli Zaretskii [this message]
2023-11-10 22:35     ` Spencer Baugh
2023-11-14 22:09       ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-11-15 12:02         ` Eli Zaretskii
2023-11-15 12:19           ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-11-15 17:17             ` Eli Zaretskii

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=83il69xwsr.fsf@gnu.org \
    --to=eliz@gnu.org \
    --cc=67046@debbugs.gnu.org \
    --cc=monnier@iro.umontreal.ca \
    --cc=sbaugh@janestreet.com \
    /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.