[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] Changes to emacs/lisp/mouse.el
From: |
Richard M. Stallman |
Subject: |
[Emacs-diffs] Changes to emacs/lisp/mouse.el |
Date: |
Wed, 28 Dec 2005 03:19:29 +0000 |
Index: emacs/lisp/mouse.el
diff -u emacs/lisp/mouse.el:1.289 emacs/lisp/mouse.el:1.290
--- emacs/lisp/mouse.el:1.289 Fri Dec 23 21:53:29 2005
+++ emacs/lisp/mouse.el Wed Dec 28 03:19:29 2005
@@ -1002,25 +1002,30 @@
(or end-point
(= (window-start start-window)
start-window-start)))
- (if (and on-link
- (or (not end-point) (= end-point start-point))
- (consp event)
- (or remap-double-click
- (and
- (not (eq mouse-1-click-follows-link 'double))
- (= click-count 0)
- (= (event-click-count event) 1)
- (not (input-pending-p))
- (or (not (integerp mouse-1-click-follows-link))
- (let ((t0 (posn-timestamp (event-start
start-event)))
- (t1 (posn-timestamp (event-end
event))))
- (and (integerp t0) (integerp t1)
- (if (> mouse-1-click-follows-link 0)
- (<= (- t1 t0)
mouse-1-click-follows-link)
- (< (- t0 t1)
mouse-1-click-follows-link))))))))
- (if (or (vectorp on-link) (stringp on-link))
- (setq event (aref on-link 0))
- (setcar event 'mouse-2)))
+ (when (and on-link
+ (or (not end-point) (= end-point start-point))
+ (consp event)
+ (or remap-double-click
+ (and
+ (not (eq mouse-1-click-follows-link 'double))
+ (= click-count 0)
+ (= (event-click-count event) 1)
+ (not (input-pending-p))
+ (or (not (integerp mouse-1-click-follows-link))
+ (let ((t0 (posn-timestamp (event-start
start-event)))
+ (t1 (posn-timestamp (event-end
event))))
+ (and (integerp t0) (integerp t1)
+ (if (> mouse-1-click-follows-link 0)
+ (<= (- t1 t0)
mouse-1-click-follows-link)
+ (< (- t0 t1)
mouse-1-click-follows-link))))))))
+ ;; Reselect previous selected window,
+ ;; so that the mouse-2 event runs in the same
+ ;; situation as if user had clicked it directly.
+ ;; Fixes the bug reported by address@hidden on 2005-12-27.
+ (select-window original-window)
+ (if (or (vectorp on-link) (stringp on-link))
+ (setq event (aref on-link 0))
+ (setcar event 'mouse-2)))
(push event unread-command-events))))
;; Case where the end-event is not a cons cell (it's just a boring