From 91a6bc102efbb97df539f48895a97ee75ecb357d Mon Sep 17 00:00:00 2001 From: "Richard M. Stallman" Date: Fri, 16 Jun 1995 04:37:44 +0000 Subject: [PATCH] (mouse-set-region): Bind last-command with this-command. --- lisp/mouse.el | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lisp/mouse.el b/lisp/mouse.el index bdaf3c28962..46fb5343cf5 100644 --- a/lisp/mouse.el +++ b/lisp/mouse.el @@ -325,7 +325,8 @@ This should be bound to a mouse drag event." (goto-char (posn-point end))) ;; Don't set this-command to kill-region, so that a following ;; C-w will not double the text in the kill ring. - (let (this-command) + ;; Ignore last-command so we don't append to a preceding kill. + (let (this-command last-command) (copy-region-as-kill (mark) (point))) (mouse-set-region-1))) -- 2.39.2