Subject: bug#11088: 24.0.94; minor mode cannot be cleanly turned off in idle timer

From: Stefan Monnier <[email-masked]>
Date: Mon, 26 Mar 2012 14:03:40 -0400

>> It's a known problem: the set of active keymaps is computed before Emacs
>> starts waiting for the next key-sequence and is not recomputed after
>> running idle timers and process filters.

> Could you document this limitation in run-with-timer or
> run-with-idle-timer?  I could do it but I might not understand the
> problem well. Thanks.

I don't think it's worth the trouble to try and document the problem
everywhere where it might appear (timers, process filters, process
sentinels, or any code run by them such as font-lock code, ...).

Better would be to fix it (basically, delay the initialization of
nmaps/submaps/defs in keyboard.c:read_key_sequence to after we did the
first "read_char").

        Stefan