GNU bug report logs -
#10459
Overlay keymaps ignored until point is moved when overlay is created from timer
Previous Next
Full log
View this message in rfc822 format
Emacs versions known to be affected:
------------------------------------
23.2.1, 24 (recent bzr checkout).
Steps to reproduce:
-------------------
1. Define the following function:
(defun test ()
(interactive)
(run-with-timer
2 nil
(lambda ()
(setq overlay (make-overlay 4 8))
(overlay-put overlay 'face '(background-color . "black"))
(let ((map (make-sparse-keymap)))
(overlay-put overlay 'keymap map)
(define-key map "t" (lambda () (interactive)
(message "overlay keymap binding")))))))
2. Position point somewhere between 4 and 8.
3. M-x test
4. type "t" (*without* moving point first)
Expected output:
----------------
Overlay keymap binding should display the message "overlay keymap binding".
Actual output:
--------------
Default `self-insert-command' binding inserts character "t" into the buffer.
Additional information:
-----------------------
Note that moving the point, e.g. one character to the right and then back,
in between septs 3. and 4. seems to activate the overlay keymap binding,
so that typing "t" in step 4. displays the correct message.
--
Dr T. S. Cubitt
Mathematics and Quantum Information group
Department of Mathematics
Complutense University
Madrid, Spain
This bug report was last modified 10 years and 232 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.