From: Chong Yidong Date: Fri, 27 Apr 2012 02:24:38 +0000 (+0800) Subject: Fix for tool-bar confusion in read-key. X-Git-Tag: emacs-24.0.96~1 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=c5bb756916baa63cc663d68d4c24e5ad33a764e8;p=emacs.git 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 --- diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 6d3fcf971b1..baa8045ccc3 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,8 @@ +2012-04-27 Chong Yidong + + * subr.el (read-key): Avoid running filter function when setting + up temporary tool bar entries (Bug#9922). + 2012-04-26 Andreas Schwab * vc/vc-git.el (vc-git-state): Fix regexp matching diff output. 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)