emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] /srv/bzr/emacs/emacs-24 r107912: Fix for tool-bar confusio


From: Chong Yidong
Subject: [Emacs-diffs] /srv/bzr/emacs/emacs-24 r107912: Fix for tool-bar confusion in read-key.
Date: Fri, 27 Apr 2012 10:24:38 +0800
User-agent: Bazaar (2.3.1)

------------------------------------------------------------
revno: 107912
fixes bug(s): http://debbugs.gnu.org/9922
committer: Chong Yidong <address@hidden>
branch nick: emacs-24
timestamp: Fri 2012-04-27 10:24:38 +0800
message:
  Fix for tool-bar confusion in read-key.
  
  * lisp/subr.el (read-key): Avoid running filter function when setting
  up temporary tool bar entries.
modified:
  lisp/ChangeLog
  lisp/subr.el
=== modified file 'lisp/ChangeLog'
--- a/lisp/ChangeLog    2012-04-26 09:27:37 +0000
+++ b/lisp/ChangeLog    2012-04-27 02:24:38 +0000
@@ -1,3 +1,8 @@
+2012-04-27  Chong Yidong  <address@hidden>
+
+       * subr.el (read-key): Avoid running filter function when setting
+       up temporary tool bar entries (Bug#9922).
+
 2012-04-26  Andreas Schwab  <address@hidden>
 
        * vc/vc-git.el (vc-git-state): Fix regexp matching diff output.

=== modified file 'lisp/subr.el'
--- a/lisp/subr.el      2012-04-19 06:04:05 +0000
+++ b/lisp/subr.el      2012-04-27 02:24:38 +0000
@@ -2019,7 +2019,10 @@
            (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)


reply via email to

[Prev in Thread] Current Thread [Next in Thread]