aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKarl Heuer1994-11-18 07:47:19 +0000
committerKarl Heuer1994-11-18 07:47:19 +0000
commit626a097ccf2a122f0e39a8801ef2cf98b6d11f55 (patch)
treef92ee628c5c5a64e9b84ccf1369ed2f9299ca777
parent228a2e1a479455a6ce156ea19aa72ebfd01be7d4 (diff)
downloademacs-626a097ccf2a122f0e39a8801ef2cf98b6d11f55.tar.gz
emacs-626a097ccf2a122f0e39a8801ef2cf98b6d11f55.zip
(kill-region): Set this-command unconditionally.
-rw-r--r--lisp/simple.el7
1 files 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."
1113 ;; This should always barf, and give us the correct error. 1113 ;; This should always barf, and give us the correct error.
1114 (if kill-read-only-ok 1114 (if kill-read-only-ok
1115 (message "Read only text copied to kill ring") 1115 (message "Read only text copied to kill ring")
1116 (setq this-command 'kill-region)
1116 (barf-if-buffer-read-only))) 1117 (barf-if-buffer-read-only)))
1117 1118
1118 ;; In certain cases, we can arrange for the undo list and the kill 1119 ;; 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."
1132 (setq tail (cdr tail))) 1133 (setq tail (cdr tail)))
1133 ;; Take the same string recorded for undo 1134 ;; Take the same string recorded for undo
1134 ;; and put it in the kill-ring. 1135 ;; and put it in the kill-ring.
1135 (kill-new (car (car tail))) 1136 (kill-new (car (car tail)))))
1136 (setq this-command 'kill-region)))
1137 1137
1138 (t 1138 (t
1139 (copy-region-as-kill beg end) 1139 (copy-region-as-kill beg end)
1140 (delete-region beg end)))) 1140 (delete-region beg end)))
1141 (setq this-command 'kill-region))
1141 1142
1142;; copy-region-as-kill no longer sets this-command, because it's confusing 1143;; copy-region-as-kill no longer sets this-command, because it's confusing
1143;; to get two copies of the text when the user accidentally types M-w and 1144;; to get two copies of the text when the user accidentally types M-w and