emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] /srv/bzr/emacs/trunk r112092: * lisp/mouse.el (mouse--down


From: Stefan Monnier
Subject: [Emacs-diffs] /srv/bzr/emacs/trunk r112092: * lisp/mouse.el (mouse--down-1-maybe-follows-link): Fix follow-link
Date: Tue, 19 Mar 2013 08:47:10 -0400
User-agent: Bazaar (2.5.0)

------------------------------------------------------------
revno: 112092
committer: Stefan Monnier <address@hidden>
branch nick: trunk
timestamp: Tue 2013-03-19 08:47:10 -0400
message:
  * lisp/mouse.el (mouse--down-1-maybe-follows-link): Fix follow-link
  remapping in mode-line.
  (mouse-on-link-p): Also check [mode-line follow-link] bindings.
modified:
  lisp/ChangeLog
  lisp/mouse.el
=== modified file 'lisp/ChangeLog'
--- a/lisp/ChangeLog    2013-03-19 05:06:49 +0000
+++ b/lisp/ChangeLog    2013-03-19 12:47:10 +0000
@@ -1,3 +1,9 @@
+2013-03-19  Stefan Monnier  <address@hidden>
+
+       * mouse.el (mouse--down-1-maybe-follows-link): Fix follow-link
+       remapping in mode-line.
+       (mouse-on-link-p): Also check [mode-line follow-link] bindings.
+
 2013-03-19  Dmitry Gutov  <address@hidden>
 
        * whitespace.el (whitespace-color-on): Use `prepend' OVERRIDE

=== modified file 'lisp/mouse.el'
--- a/lisp/mouse.el     2013-03-18 17:19:24 +0000
+++ b/lisp/mouse.el     2013-03-19 12:47:10 +0000
@@ -128,7 +128,11 @@
                 (put newup 'event-kind (get (car event) 'event-kind))
                 (put newdown 'event-kind (get (car this-event) 'event-kind))
                 (push (cons newup (cdr event)) unread-command-events)
-                (vector (cons newdown (cdr this-event))))
+                ;; 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))
             (push event unread-command-events)
             nil))))))
 
@@ -760,6 +764,9 @@
                  mouse-1-click-in-non-selected-windows
                  (eq (selected-window) (posn-window pos)))
              (or (mouse-posn-property pos 'follow-link)
+                  (let ((area (posn-area pos)))
+                    (when area
+                      (key-binding (vector area 'follow-link) nil t pos)))
                  (key-binding [follow-link] nil t pos)))))
     (cond
      ((eq action 'mouse-face)


reply via email to

[Prev in Thread] Current Thread [Next in Thread]