bug-gnu-emacs
[Top][All Lists]
Advanced

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

bug#6881: 23.2; bookmark-bmenu-search makes menu disappear


From: Stefan Monnier
Subject: bug#6881: 23.2; bookmark-bmenu-search makes menu disappear
Date: Thu, 19 Aug 2010 16:47:58 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.50 (gnu/linux)

> This is a bug in read-key.
> It appears using read-char solve this problem and the key echoing one.

I strongly encourage people to switch from read-char to read-key, so if
there's a problem with read-key, I'd rather try and fix it rather than
return to read-char.

I've just installed the patch below into emacs-23 which should fix it.


        Stefan


=== modified file 'lisp/subr.el'
--- lisp/subr.el        2010-07-10 18:52:53 +0000
+++ lisp/subr.el        2010-08-19 14:25:12 +0000
@@ -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))))






reply via email to

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