GNU bug report logs - #11088
24.0.94; minor mode cannot be cleanly turned off in idle timer

Previous Next

Package: emacs;

Reported by: Leo <sdl.web <at> gmail.com>

Date: Sun, 25 Mar 2012 15:04:02 UTC

Severity: normal

Merged with 4081, 4093, 10459

Found in version 24.0.94

Fixed in version 24.4

Done: Dmitry Gutov <dgutov <at> yandex.ru>

Bug is archived. No further changes may be made.

Full log


Message #8 received at 11088 <at> debbugs.gnu.org (full text, mbox):

From: Stefan Monnier <monnier <at> iro.umontreal.ca>
To: Leo <sdl.web <at> gmail.com>
Cc: 11088 <at> debbugs.gnu.org, Chong Yidong <cyd <at> stupidchicken.com>
Subject: Re: bug#11088: 24.0.94;
	minor mode cannot be cleanly turned off in idle timer
Date: Sun, 25 Mar 2012 14:28:21 -0400
> 1. emacs -q -l t.el
> 2. C-c w
> 3. let emacs idle for more than 2 seconds
> 4. type `l'

> You should still see the message "hello world" printed, which is odd
> since I expect the minor mode turned off by now.

> (defvar test-mode-map
>   (let ((map (make-sparse-keymap)))
>     (define-key map "l" (lambda () (interactive) (message "Hello World")))
>     map))

> (define-minor-mode test-mode ""
>   :global t
>   (if test-mode
>       (run-with-idle-timer 2 nil 'test-mode -1)))

> (global-set-key "\C-cw" 'test-mode)

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.


        Stefan




This bug report was last modified 10 years and 230 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.