]> code.delx.au - gnu-emacs/commitdiff
* lisp/mouse.el (mouse--down-1-maybe-follows-link): Don't convert the down
authorStefan Monnier <monnier@iro.umontreal.ca>
Fri, 8 Aug 2014 16:56:50 +0000 (12:56 -0400)
committerStefan Monnier <monnier@iro.umontreal.ca>
Fri, 8 Aug 2014 16:56:50 +0000 (12:56 -0400)
event.

Fixes: debbugs:18212
lisp/ChangeLog
lisp/mouse.el

index 19b421c679bc4329ee141a336929a08f12dbc50b..0b8c538a336d3a75fea2d09e99972427580a9069 100644 (file)
@@ -1,3 +1,8 @@
+2014-08-08  Stefan Monnier  <monnier@iro.umontreal.ca>
+
+       * mouse.el (mouse--down-1-maybe-follows-link): Don't convert the down
+       event (bug#18212).
+
 2014-08-08  Eli Zaretskii  <eliz@gnu.org>
 
        * info.el (info): Doc fix.
index 1cbff687c64c9ead67536b9794a8b7efa046a0d6..99407d9f9cfe04e889a3a18dc7a4266a45f293f9 100644 (file)
@@ -117,19 +117,14 @@ Expects to be bound to `down-mouse-1' in `key-translation-map'."
                                        'double-mouse-1 'mouse-1))
               ;; Turn the mouse-1 into a mouse-2 to follow links.
               (let ((newup (if (eq mouse-1-click-follows-link 'double)
-                                'double-mouse-2 'mouse-2))
-                    (newdown (if (eq mouse-1-click-follows-link 'double)
-                                 'double-down-mouse-2 'down-mouse-2)))
+                                'double-mouse-2 'mouse-2)))
                 ;; If mouse-2 has never been done by the user, it doesn't have
                 ;; the necessary property to be interpreted correctly.
-                (put newup 'event-kind (get (car event) 'event-kind))
-                (put newdown 'event-kind (get (car this-event) 'event-kind))
+                (unless (get newup 'event-kind)
+                  (put newup 'event-kind (get (car event) 'event-kind)))
                 (push (cons newup (cdr event)) unread-command-events)
-                ;; Modify the event in place, so read-key-sequence doesn't
-                ;; generate a second fake prefix key (see fake_prefixed_keys in
-                ;; src/keyboard.c).
-                (setcar this-event newdown)
-                (vector this-event))
+                ;; Don't change the down event, only the up-event (bug#18212).
+                nil)
             (push event unread-command-events)
             nil))))))