changeset 10012:4b936f4cad5c

(kill-region): Set this-command unconditionally.
author Karl Heuer <kwzh@gnu.org>
date Fri, 18 Nov 1994 07:47:19 +0000
parents f4f2563057b8
children fd7810a1535a
files lisp/simple.el
diffstat 1 files changed, 4 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/simple.el	Fri Nov 18 07:17:17 1994 +0000
+++ b/lisp/simple.el	Fri Nov 18 07:47:19 1994 +0000
@@ -1113,6 +1113,7 @@
     ;; 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 @@
 	(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