[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: |
Juri Linkov |
Subject: |
bug#56425: 28.1; post-command-hook is triggered on y-or-n-p |
Date: |
Wed, 06 Jul 2022 21:19:00 +0300 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (x86_64-pc-linux-gnu) |
> Is read-from-minibuffer triggering the post-command-hook?
This is the most interesting question. When you replace the y-or-n-p call
in your code with read-from-minibuffer, do you see the same result?
If not, then maybe these lines y-or-n-p affect the behavior somehow,
but I'm sure:
;; Protect this-command when called from pre-command-hook (bug#45029)
(this-command this-command)
If all fails, then as the last resort you always have an option to
fall back to the modal behavior of y-or-n-p by wrapping the call
with y-or-n-p-use-read-key:
(let ((y-or-n-p-use-read-key t)) (y-or-n-p "Some question: "))