Stefan Monnier wrote:
selecting a keymap (e.g. when changing minor-mode, creating 'keymap
overlays, setting overriding-local-map, use-local-map) in a
run-with-timer or run-with-idle-timer event doesn't take immediate
effect.

Consider the following example:
(run-with-timer 3 nil '(lambda ()
                         (let ((map (make-sparse-keymap)))
                           (define-key map "x" "y")
                           (use-local-map map))
                         (message "timer fired")))

After the message "timer fired", pressing the "x" key still inserts an
"x".  Only beginning with the second time it will insert a "y".

Indeed it does: the list of active keymaps is computed right before calling
`read', i.e. right when going idle at the end of the previous command.

It would probably be good to delay it, but this is not very high priority.
I've added it to the TODO list.


If you think it is possible to do it now it would be good. I need this for mumamo too. (Mumamo is here: http://www.emacswiki.org/cgi-bin/wiki/MuMaMo)

I have a workaround there for this. I call top-level after such changes (in this case after changing major mode in a timer).


_______________________________________________
emacs-pretest-bug mailing list
[EMAIL PROTECTED]
http://lists.gnu.org/mailman/listinfo/emacs-pretest-bug

Reply via email to