From: Kai Großjohann Date: Wed, 28 May 2003 20:07:10 +0000 (+0000) Subject: (kill-region): If nothing was killed, and the X-Git-Tag: ttn-vms-21-2-B4~9882 X-Git-Url: https://code.delx.au/gnu-emacs/commitdiff_plain/8a7cda9bfa3115a5c59c34147837435b3797021e (kill-region): If nothing was killed, and the previous command was not a kill, break kill sequence. --- diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 45c321247e..fb09251f89 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 b572396566..3dcbb73f11 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.