[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] emacs-25 ea1960b: Avoid resetting track-mouse by mouse cli
From: |
Eli Zaretskii |
Subject: |
[Emacs-diffs] emacs-25 ea1960b: Avoid resetting track-mouse by mouse clicks |
Date: |
Wed, 21 Sep 2016 15:01:02 +0000 (UTC) |
branch: emacs-25
commit ea1960bf3ccbceb955002837f17b67071789e863
Author: Eli Zaretskii <address@hidden>
Commit: Eli Zaretskii <address@hidden>
Avoid resetting track-mouse by mouse clicks
* lisp/mouse.el (mouse-drag-line, mouse-drag-track): Don't assume
the previous value of track-mouse is nil; instead, save and
restore the previous value. (Bug#24480)
---
lisp/mouse.el | 10 ++++++----
1 file changed, 6 insertions(+), 4 deletions(-)
diff --git a/lisp/mouse.el b/lisp/mouse.el
index 27f2acb..d069400 100644
--- a/lisp/mouse.el
+++ b/lisp/mouse.el
@@ -481,7 +481,8 @@ must be one of the symbols `header', `mode', or `vertical'."
(window-pixel-height window)))))
(setq dragged t)
(adjust-window-trailing-edge window growth nil t))
- (setq last-position position))))))
+ (setq last-position position)))))
+ (old-track-mouse track-mouse))
;; Start tracking. The special value 'dragging' signals the
;; display engine to freeze the mouse pointer shape for as long
;; as we drag.
@@ -514,7 +515,7 @@ must be one of the symbols `header', `mode', or `vertical'."
(define-key map [right-divider] map)
(define-key map [bottom-divider] map)
map)
- t (lambda () (setq track-mouse nil)))))))
+ t (lambda () (setq track-mouse old-track-mouse)))))))
(defun mouse-drag-mode-line (start-event)
"Change the height of a window by dragging on the mode line."
@@ -825,7 +826,8 @@ The region will be defined with mark and point."
(click-count (1- (event-click-count start-event)))
;; Suppress automatic hscrolling, because that is a nuisance
;; when setting point near the right fringe (but see below).
- (auto-hscroll-mode-saved auto-hscroll-mode))
+ (auto-hscroll-mode-saved auto-hscroll-mode)
+ (old-track-mouse track-mouse))
(setq mouse-selection-click-count click-count)
;; In case the down click is in the middle of some intangible text,
@@ -877,7 +879,7 @@ The region will be defined with mark and point."
nil start-point))))))))
map)
t (lambda ()
- (setq track-mouse nil)
+ (setq track-mouse old-track-mouse)
(setq auto-hscroll-mode auto-hscroll-mode-saved)
(deactivate-mark)
(pop-mark)))))
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Emacs-diffs] emacs-25 ea1960b: Avoid resetting track-mouse by mouse clicks,
Eli Zaretskii <=