From 46d91fa0dff86fe6212466b40c68a2a08a1523d2 Mon Sep 17 00:00:00 2001 From: Chong Yidong Date: Tue, 7 Mar 2006 15:53:41 +0000 Subject: [PATCH] * help.el (describe-key-briefly): If KEY is a down event, read and discard the up event. --- lisp/ChangeLog | 5 +++++ lisp/help.el | 6 ++++++ 2 files changed, 11 insertions(+) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index c7c2661b2a9..18fa97f0d20 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,8 @@ +2006-03-07 Chong Yidong + + * help.el (describe-key-briefly): If KEY is a down event, read and + discard the up event. + 2006-03-07 Nick Roberts * progmodes/gud.el (gud-speedbar-buttons): Allow pointers to diff --git a/lisp/help.el b/lisp/help.el index 7c84f44f6a0..a39d344dc04 100644 --- a/lisp/help.el +++ b/lisp/help.el @@ -577,6 +577,12 @@ temporarily enables it to allow getting help on disabled items and buttons." (setq saved-yank-menu (copy-sequence yank-menu)) (menu-bar-update-yank-menu "(any string)" nil)) (setq key (read-key-sequence "Describe key (or click or menu item): ")) + ;; If KEY is a down-event, read and discard the + ;; corresponding up-event. + (if (and (vectorp key) + (eventp (elt key 0)) + (memq 'down (event-modifiers (elt key 0)))) + (read-event)) (list key (if current-prefix-arg (prefix-numeric-value current-prefix-arg)) -- 2.39.2