|
From: | Joost Kremers |
Subject: | Minor mode hook run when mode is deactivated? |
Date: | Thu, 08 Oct 2020 01:15:06 +0200 |
User-agent: | mu4e 1.5.5; emacs 27.1.50 |
Hi,I recently ran into a problem that was apparently caused by a minor mode hook being run when the mode is deactivated. Counter-intuitive as that may be (to me, at least), a quick look at the code for `define-minor-mode` seems to suggest that it's in fact correct.
Is there a rationale behind this? I noticed in the code that there are actually two more hooks, `<mode>-on-hook` and `<mode>-off-hook`, which according to a comment in the code are there for backward compatibility only. Which suggests that someone at some point thought about these things and made a conscious decision to this effect.
Which in turn makes me wonder what the rationale was for that decision. :-) Also, I haven't been able to find any info on this in the Elisp and Emacs manuals. Aren't minor modes supposed to be turned off?
TIA -- Joost Kremers Life has its moments
[Prev in Thread] | Current Thread | [Next in Thread] |