# HG changeset patch # User Chong Yidong # Date 1207167393 0 # Node ID b615c4d2a14d148825734989a263992757794735 # Parent 715d9d088f88bf0ef4f442b56d71ffceb7f2d41e (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. diff -r 715d9d088f88 -r b615c4d2a14d lisp/mouse.el --- a/lisp/mouse.el Wed Apr 02 20:16:10 2008 +0000 +++ b/lisp/mouse.el Wed Apr 02 20:16:33 2008 +0000 @@ -691,8 +691,11 @@ (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 @@ (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)