bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#56425: 28.1; post-command-hook is triggered on y-or-n-p


From: Lars Ingebrigtsen
Subject: bug#56425: 28.1; post-command-hook is triggered on y-or-n-p
Date: Mon, 11 Jul 2022 12:54:26 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (gnu/linux)

Eli Zaretskii <eliz@gnu.org> writes:

> Why are you surprised?  y-or-n-p invokes read-from-minibuffer, which
> invokes recursive-edit, which starts a recursive command loop.  And
> the command loop calls post-command-hook on each iteration.

When writing post-command-hook code, you have to be check whether you're
in the context you want to be (for instance, in the minubuffer or not).
I think it's always been this way, but these day we use the
read-from-minibuffer a lot more than we used to -- so y-or-n-p didn't
use to have this issue, but it does now.

But I think things are working as designed here, basically, so I'm
closing this bug report.

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





reply via email to

[Prev in Thread] Current Thread [Next in Thread]