* help.el (describe-key-briefly): If KEY is a down event, read and

discard the up event.
This commit is contained in:
Chong Yidong
2006-03-07 15:53:41 +00:00
parent 19bf3d3fa4
commit 46d91fa0df
2 changed files with 11 additions and 0 deletions

View File

@@ -1,3 +1,8 @@
2006-03-07 Chong Yidong <cyd@stupidchicken.com>
* help.el (describe-key-briefly): If KEY is a down event, read and
discard the up event.
2006-03-07 Nick Roberts <nickrob@snap.net.nz>
* progmodes/gud.el (gud-speedbar-buttons): Allow pointers to

View File

@@ -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))