summaryrefslogtreecommitdiff
path: root/lisp
diff options
context:
space:
mode:
authorChong Yidong <cyd@stupidchicken.com>2006-09-23 19:34:38 +0000
committerChong Yidong <cyd@stupidchicken.com>2006-09-23 19:34:38 +0000
commit98da283bf04e9b364ba4a39c9cf0d197a10cdab5 (patch)
treedd14dab580f169d701b67f965b470afd4cdce6dd /lisp
parentabb67ad338c04e467adadec09562563701223393 (diff)
downloademacs-98da283bf04e9b364ba4a39c9cf0d197a10cdab5.tar.gz
* help.el (describe-key-briefly, describe-key): Don't expect an
extra up event if a down-event is generated by a popup menu.
Diffstat (limited to 'lisp')
-rw-r--r--lisp/ChangeLog5
-rw-r--r--lisp/help.el14
2 files changed, 17 insertions, 2 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index 8916311cde9..254546968c0 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,3 +1,8 @@
+2006-09-23 Chong Yidong <cyd@stupidchicken.com>
+
+ * help.el (describe-key-briefly, describe-key): Don't expect an
+ extra up event if a down-event is generated by a popup menu.
+
2006-09-23 Michal Nazarewicz <mnazarewicz@gmail.com> (tiny change)
* textmodes/ispell.el (ispell-change-dictionary): Don't check the
diff --git a/lisp/help.el b/lisp/help.el
index fafe6e57ed0..10ad5fe6deb 100644
--- a/lisp/help.el
+++ b/lisp/help.el
@@ -572,7 +572,12 @@ temporarily enables it to allow getting help on disabled items and buttons."
;; event then is in the second element of the vector.
(and (vectorp key)
(or (and (eventp (aref key 0))
- (memq 'down (event-modifiers (aref key 0))))
+ (memq 'down (event-modifiers (aref key 0)))
+ ;; However, for the C-down-mouse-2 popup
+ ;; menu, there is no subsequent up-event. In
+ ;; this case, the up-event is the next
+ ;; element in the supplied vector.
+ (= (length key) 1))
(and (> (length key) 1)
(eventp (aref key 1))
(memq 'down (event-modifiers (aref key 1)))))
@@ -647,7 +652,12 @@ temporarily enables it to allow getting help on disabled items and buttons."
;; and use it as the third argument.
(and (vectorp key)
(or (and (eventp (aref key 0))
- (memq 'down (event-modifiers (aref key 0))))
+ (memq 'down (event-modifiers (aref key 0)))
+ ;; However, for the C-down-mouse-2 popup
+ ;; menu, there is no subsequent up-event. In
+ ;; this case, the up-event is the next
+ ;; element in the supplied vector.
+ (= (length key) 1))
(and (> (length key) 1)
(eventp (aref key 1))
(memq 'down (event-modifiers (aref key 1)))))