From 8a7cda9bfa3115a5c59c34147837435b3797021e Mon Sep 17 00:00:00 2001 From: =?utf8?q?Kai=20Gro=C3=9Fjohann?= Date: Wed, 28 May 2003 20:07:10 +0000 Subject: [PATCH] (kill-region): If nothing was killed, and the previous command was not a kill, break kill sequence. --- lisp/ChangeLog | 5 +++++ lisp/simple.el | 3 ++- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 45c321247ed..fb09251f895 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,8 @@ +2003-05-28 Kai Gro,A_(Bjohann + + * simple.el (kill-region): If nothing was killed, and the + previous command was not a kill, break kill sequence. + 2003-05-28 Richard M. Stallman * textmodes/refill.el (refill-fill-paragraph-at): diff --git a/lisp/simple.el b/lisp/simple.el index b5723965665..3dcbb73f114 100644 --- a/lisp/simple.el +++ b/lisp/simple.el @@ -1913,7 +1913,8 @@ text property to be set on the killed text. See `insert-for-yank'." (if (eq last-command 'kill-region) (kill-append string (< end beg) yank-handler) (kill-new string nil yank-handler))) - (setq this-command 'kill-region)) + (when (or string (eq last-command 'kill-region)) + (setq this-command 'kill-region))) ((buffer-read-only text-read-only) ;; The code above failed because the buffer, or some of the characters ;; in the region, are read-only. -- 2.39.5