From 6452d8a6f4f0271e24d12623724d5759f9cb5af6 Mon Sep 17 00:00:00 2001 From: "Richard M. Stallman" Date: Mon, 4 Jul 1994 00:49:37 +0000 Subject: [PATCH] (mouse-drag-region): Bind this-command like last-command. (mouse-kill-ring-save): Bind this-command and last-command. --- lisp/mouse.el | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/lisp/mouse.el b/lisp/mouse.el index c10dad11572..6bc7259e6e0 100644 --- a/lisp/mouse.el +++ b/lisp/mouse.el @@ -258,7 +258,7 @@ release the mouse button. Otherwise, it does not." (let ((fun (key-binding (vector (car event))))) (if (not (= (overlay-start mouse-drag-overlay) (overlay-end mouse-drag-overlay))) - (let (last-command) + (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))) @@ -390,7 +390,8 @@ regardless of where you click." This does not delete the region; it acts like \\[kill-ring-save]." (interactive "e") (mouse-set-mark-fast click) - (kill-ring-save (point) (mark t)) + (let (this-command last-command) + (kill-ring-save (point) (mark t))) (mouse-show-mark)) ;;; This function used to delete the text between point and the mouse -- 2.39.5