summaryrefslogtreecommitdiff
path: root/lisp/mouse.el
diff options
context:
space:
mode:
authorRichard M. Stallman <rms@gnu.org>1996-05-06 00:43:26 +0000
committerRichard M. Stallman <rms@gnu.org>1996-05-06 00:43:26 +0000
commit25f535bbb4099e3ba1cc7d3716fb00d48cd424e6 (patch)
tree53a7c149aadd137d15e13b27c4b22ad30d61f645 /lisp/mouse.el
parentae39f49b67ec5be79ffd8bef5668d07c18f8850a (diff)
downloademacs-25f535bbb4099e3ba1cc7d3716fb00d48cd424e6.tar.gz
(mouse-drag-region): Set the region before reading a
character, so the selection exists while we wait.
Diffstat (limited to 'lisp/mouse.el')
-rw-r--r--lisp/mouse.el6
1 files changed, 3 insertions, 3 deletions
diff --git a/lisp/mouse.el b/lisp/mouse.el
index 14fe1c77529..00a53d6c8fc 100644
--- a/lisp/mouse.el
+++ b/lisp/mouse.el
@@ -575,13 +575,13 @@ remains active. Otherwise, it remains until the next input event."
(if (not (= (overlay-start mouse-drag-overlay)
(overlay-end mouse-drag-overlay)))
(let (last-command this-command)
+ (push-mark (overlay-start mouse-drag-overlay) t t)
+ (goto-char (overlay-end mouse-drag-overlay))
+ (copy-region-as-kill (point) (mark t))
(let ((inhibit-quit t))
(setq unread-command-events
(cons (read-event) unread-command-events))
(setq quit-flag nil))
- (push-mark (overlay-start mouse-drag-overlay) t t)
- (goto-char (overlay-end mouse-drag-overlay))
- (copy-region-as-kill (point) (mark t))
(mouse-set-region-1)
(delete-overlay mouse-drag-overlay))
(goto-char (overlay-end mouse-drag-overlay))