From 3544cfc9b9015b16c66bd827d7e80193320459a7 Mon Sep 17 00:00:00 2001 From: "Richard M. Stallman" Date: Wed, 3 Nov 1993 00:50:06 +0000 Subject: [PATCH] (mouse-drag-region): Set this-command to mouse-set-point if not setting the mark. (mouse-save-then-kill): Consider mark-active only in transient mark md. --- lisp/mouse.el | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lisp/mouse.el b/lisp/mouse.el index 90175551a63..7bdcae71c8d 100644 --- a/lisp/mouse.el +++ b/lisp/mouse.el @@ -249,7 +249,8 @@ release the mouse button. Otherwise, it does not." (push-mark (overlay-start mouse-drag-overlay) t t) (goto-char (overlay-end mouse-drag-overlay)) (copy-region-as-kill (point) (mark t))) - (goto-char (overlay-end mouse-drag-overlay))) + (goto-char (overlay-end mouse-drag-overlay)) + (setq this-command 'mouse-set-point)) (if (fboundp fun) (funcall fun event))))) (delete-overlay mouse-drag-overlay)))) @@ -447,9 +448,8 @@ If you do this twice in the same position, the selection is killed." ;; mouse-save-then-kill, delete the text from the buffer. (mouse-save-then-kill-delete-region) (if (or (eq last-command 'mouse-save-then-kill) - mark-active + (and mark-active transient-mark-mode) (and (eq last-command 'mouse-drag-region) - (mark t) (or mark-even-if-inactive (not transient-mark-mode)))) ;; We have a selection or suitable region, so adjust it. -- 2.39.5