[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: |
Eli Zaretskii |
Subject: |
bug#56425: 28.1; post-command-hook is triggered on y-or-n-p |
Date: |
Wed, 06 Jul 2022 22:03:45 +0300 |
> From: Bhavin Gandhi <bhavin7392@gmail.com>
> Date: Wed, 6 Jul 2022 23:25:34 +0530
>
> Also, my-test-command has not finished executing yet, it is waiting for
> user input, so how does it trigger the post-command-hook? I'm not able
> to understand what causes it to trigger the post-command-hook, is it an
> expected behavior?
Yes.
> I'm I missing something here? Is read-from-minibuffer
> triggering the post-command-hook?
Yes.
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.