* lisp/subr.el (read-key): Avoid running filter function when setting
up temporary tool bar entries.
Fixes: debbugs:9922
+2012-04-27 Chong Yidong <cyd@gnu.org>
+
+ * subr.el (read-key): Avoid running filter function when setting
+ up temporary tool bar entries (Bug#9922).
+
2012-04-26 Andreas Schwab <schwab@linux-m68k.org>
* vc/vc-git.el (vc-git-state): Fix regexp matching diff output.
(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)