diff options
author | Chong Yidong <cyd@gnu.org> | 2012-04-27 10:24:38 +0800 |
---|---|---|
committer | Chong Yidong <cyd@gnu.org> | 2012-04-27 10:24:38 +0800 |
commit | c5bb756916baa63cc663d68d4c24e5ad33a764e8 (patch) | |
tree | d88d53124dfc2559f3a798bcce00001b1615c3c7 /lisp/subr.el | |
parent | f2c3a9eb8528c16e1e917b97b4ced689c92d47cf (diff) | |
download | emacs-c5bb756916baa63cc663d68d4c24e5ad33a764e8.tar.gz |
Fix for tool-bar confusion in read-key.
* lisp/subr.el (read-key): Avoid running filter function when setting
up temporary tool bar entries.
Fixes: debbugs:9922
Diffstat (limited to 'lisp/subr.el')
-rw-r--r-- | lisp/subr.el | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/lisp/subr.el b/lisp/subr.el index 3b120e6ff6a..9b293bb21ac 100644 --- a/lisp/subr.el +++ b/lisp/subr.el @@ -2019,7 +2019,10 @@ some sort of escape sequence, the ambiguity is resolved via `read-key-delay'." (let ((map (make-sparse-keymap))) ;; Don't hide the menu-bar and tool-bar entries. (define-key map [menu-bar] (lookup-key global-map [menu-bar])) - (define-key map [tool-bar] (lookup-key global-map [tool-bar])) + (define-key map [tool-bar] + ;; This hack avoids evaluating the :filter (Bug#9922). + (or (cdr (assq 'tool-bar global-map)) + (lookup-key global-map [tool-bar]))) map)) (aref (catch 'read-key (read-key-sequence-vector prompt nil t)) 0)) (cancel-timer timer) |