]> git.eshelyaron.com Git - emacs.git/commitdiff
* help.el (describe-key-briefly, describe-key): Don't expect an
authorChong Yidong <cyd@stupidchicken.com>
Sat, 23 Sep 2006 19:34:38 +0000 (19:34 +0000)
committerChong Yidong <cyd@stupidchicken.com>
Sat, 23 Sep 2006 19:34:38 +0000 (19:34 +0000)
extra up event if a down-event is generated by a popup menu.

lisp/ChangeLog
lisp/help.el

index 8916311cde9bd6ed964d81647a15ecb6f9362c93..254546968c094e9ddec191c0c34fa78e4f73fd9d 100644 (file)
@@ -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
index fafe6e57ed002a6dcf8d6dd9fe4dd8f1f97a7938..10ad5fe6deb10d29b569ba021bc7e892bb526571 100644 (file)
@@ -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)))))