|
From: | Kim F. Storm |
Subject: | Re: Function for deleting a key binding in a sparse keymap |
Date: | Thu, 08 Dec 2005 15:24:58 +0100 |
User-agent: | Gnus/5.11 (Gnus v5.11) Emacs/22.0.50 (gnu/linux) |
LENNART BORGMAN <address@hidden> writes: >> Why do you use emulation-mode-map-alist ? > > Because in this case it is a temporary minor mode that exists just > during a few keystrokes. I actually put the keymap first in > emulation-mode-map-alists to avoid any problem. Nearly all keys > except those for using the mode are bound to a function that exits > the temporary mode. That is NOT the purpose of emulation-mode-map-alists, and there must be other ways to accomplish what you want to do. E.g. (not tested): (let (done) (while (not done) (let* ((ev (read-event)) (cmd (lookup-key your-keymap ev))) (if cmd (call-interactively cmd) ; or just funcall (setq done t) (clear-this-command-keys t) (setq unread-command-events (cons ev unread-command-events))))) -- Kim F. Storm <address@hidden> http://www.cua.dk
[Prev in Thread] | Current Thread | [Next in Thread] |