[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Fwd: idle exit hook
From: |
Stefan Monnier |
Subject: |
Re: Fwd: idle exit hook |
Date: |
Wed, 22 Jul 2020 18:31:04 -0400 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) |
> A more common behavior (as in vs-code, atom and so on) is that when we
> press any key o perform any action to exit the "highlighted thing"; the
> highlight disappears immediately.
`pre-command-hook` seems like the obvious choice.
> This could be performed using a different hook, (post-command-hook) but
> it will require add and remove the hook constantly...
Adding/removing from such hooks is very cheap, so it's not a problem.
This said, you can also just leave it on `pre-command-hook` (and set
a variable to indicate when there's nothing to unhighlight).
Stefan