summaryrefslogtreecommitdiff
path: root/lisp/mouse-sel.el
diff options
context:
space:
mode:
authorRichard M. Stallman <rms@gnu.org>1994-08-24 04:50:24 +0000
committerRichard M. Stallman <rms@gnu.org>1994-08-24 04:50:24 +0000
commit9bc12e6c3c5bfee1cdd8e6c7ca9c236251352ea0 (patch)
tree5d8bbf4426316603019d67dc9a0875ab8a91232a /lisp/mouse-sel.el
parentdb47d7e3cff02230e3006ea25ecf5f51a96bf4a0 (diff)
downloademacs-9bc12e6c3c5bfee1cdd8e6c7ca9c236251352ea0.tar.gz
(mouse-extend): In Transient Mark mode, use the region
whenever it is active.
Diffstat (limited to 'lisp/mouse-sel.el')
-rw-r--r--lisp/mouse-sel.el5
1 files changed, 3 insertions, 2 deletions
diff --git a/lisp/mouse-sel.el b/lisp/mouse-sel.el
index 881329d7167..98f704d005d 100644
--- a/lisp/mouse-sel.el
+++ b/lisp/mouse-sel.el
@@ -264,8 +264,9 @@ See documentation for mouse-select for more details.
This should be bound to a down-mouse event."
(interactive "e")
(if EVENT (select-window (posn-window (event-end EVENT))))
- (let* ((min (if (and EVENT mark-active) (region-beginning) (point)))
- (max (if (and EVENT mark-active) (region-end) (point)))
+ (let* ((use-region (and (or EVENT transient-mark-mode) mark-active))
+ (min (if use-region (region-beginning) (point)))
+ (max (if use-region (region-end) (point)))
(orig-window (selected-window))
(orig-window-frame (window-frame orig-window))
(top (nth 1 (window-edges orig-window)))