[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: kill-region

From: Kai Großjohann
Subject: Re: kill-region
Date: Fri, 23 May 2003 21:42:03 +0200
User-agent: Gnus/5.1003 (Gnus v5.10.3) Emacs/21.3.50 (gnu/linux)

Richard Stallman <address@hidden> writes:

>     Might it be better for kill-region to either not set this-command to
>     'kill-region if the last command was not already a kill command and
>     kill-region did not make a new entry on the kill ring, or,
>     alternatively, make kill-region add an empty string to the end of the
>     kill ring in the described situation, to which subsequent kill
>     commands could append or prepend?
> I agree that we should do one or the other.  I think the former is
> better, since I don't see much use in putting the empty region in the
> kill ring.  As long as we can provide fairly consistent behavior
> while not putting the empty region in the kill ring, let's do so.

How about this?

--- simple.el.~1.604.~  Thu May 22 09:59:08 2003
+++ simple.el   Fri May 23 21:40:41 2003
@@ -1913,7 +1913,8 @@
          (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.

This line is not blank.

reply via email to

[Prev in Thread] Current Thread [Next in Thread]