From 626a097ccf2a122f0e39a8801ef2cf98b6d11f55 Mon Sep 17 00:00:00 2001 From: Karl Heuer Date: Fri, 18 Nov 1994 07:47:19 +0000 Subject: [PATCH] (kill-region): Set this-command unconditionally. --- lisp/simple.el | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/lisp/simple.el b/lisp/simple.el index 9eb16684888..1f0162cdedd 100644 --- a/lisp/simple.el +++ b/lisp/simple.el @@ -1113,6 +1113,7 @@ to make one entry in the kill ring." ;; This should always barf, and give us the correct error. (if kill-read-only-ok (message "Read only text copied to kill ring") + (setq this-command 'kill-region) (barf-if-buffer-read-only))) ;; In certain cases, we can arrange for the undo list and the kill @@ -1132,12 +1133,12 @@ to make one entry in the kill ring." (setq tail (cdr tail))) ;; Take the same string recorded for undo ;; and put it in the kill-ring. - (kill-new (car (car tail))) - (setq this-command 'kill-region))) + (kill-new (car (car tail))))) (t (copy-region-as-kill beg end) - (delete-region beg end)))) + (delete-region beg end))) + (setq this-command 'kill-region)) ;; copy-region-as-kill no longer sets this-command, because it's confusing ;; to get two copies of the text when the user accidentally types M-w and -- 2.39.5