diff lisp/subr.el @ 109937:9b8e40e0bf3c

* lisp/subr.el (read-key): Don't hide the menu-bar entries.
author Stefan Monnier <monnier@iro.umontreal.ca>
date Thu, 19 Aug 2010 16:37:31 +0200
parents 0266442adf6a
children 252e1eb2e944
line wrap: on
line diff
--- a/lisp/subr.el	Thu Aug 19 01:32:39 2010 +0200
+++ b/lisp/subr.el	Thu Aug 19 16:37:31 2010 +0200
@@ -1842,7 +1842,12 @@
                       (throw 'read-key keys)))))))
     (unwind-protect
         (progn
-	  (use-global-map read-key-empty-map)
+	  (use-global-map
+           (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]))
+             map))
 	  (aref	(catch 'read-key (read-key-sequence-vector prompt nil t)) 0))
       (cancel-timer timer)
       (use-global-map old-global-map))))