summaryrefslogtreecommitdiff
path: root/lisp/mouse.el
diff options
context:
space:
mode:
authorChong Yidong <cyd@stupidchicken.com>2008-04-02 20:16:33 +0000
committerChong Yidong <cyd@stupidchicken.com>2008-04-02 20:16:33 +0000
commit688468a0125f41bfeb1e9041f9327206a0d6650f (patch)
tree96f28e4ac0bb3a9c809f863de0c99a1d8fda4af1 /lisp/mouse.el
parent109cfe4e37961ae82c00aa0cc56a7fafff3b832a (diff)
downloademacs-688468a0125f41bfeb1e9041f9327206a0d6650f.tar.gz
(mouse-set-region-1): Save the old value of transient-mark-mode.
(mouse-drag-track): Ignore the now-obsolete value `identity' for transient-mark-mode.
Diffstat (limited to 'lisp/mouse.el')
-rw-r--r--lisp/mouse.el12
1 files changed, 5 insertions, 7 deletions
diff --git a/lisp/mouse.el b/lisp/mouse.el
index 9fb04279847..c26f12c100c 100644
--- a/lisp/mouse.el
+++ b/lisp/mouse.el
@@ -691,8 +691,11 @@ This should be bound to a mouse drag event."
(defun mouse-set-region-1 ()
;; Set transient-mark-mode for a little while.
- (if (memq transient-mark-mode '(nil identity))
- (setq transient-mark-mode 'only))
+ (unless (eq (car-safe transient-mark-mode) 'only)
+ (setq transient-mark-mode
+ (cons 'only
+ (unless (eq transient-mark-mode 'lambda)
+ transient-mark-mode))))
(setq mouse-last-region-beg (region-beginning))
(setq mouse-last-region-end (region-end))
(setq mouse-last-region-tick (buffer-modified-tick)))
@@ -1029,11 +1032,6 @@ should only be used by mouse-drag-region."
(overlay-start mouse-drag-overlay))
region-termination))
last-command this-command)
- (when (eq transient-mark-mode 'identity)
- ;; Reset `transient-mark-mode' to avoid expanding the region
- ;; while scrolling (compare thread on "Erroneous selection
- ;; extension ..." on bug-gnu-emacs from 2007-06-10).
- (setq transient-mark-mode nil))
(push-mark region-commencement t t)
(goto-char region-termination)
(if (not do-mouse-drag-region-post-process)