unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: kai.grossjohann@gmx.net (Kai Großjohann)
Subject: Re: kill-region
Date: Fri, 23 May 2003 21:42:03 +0200	[thread overview]
Message-ID: <844r3l4fhw.fsf@lucy.is.informatik.uni-duisburg.de> (raw)
In-Reply-To: E19JBGh-0006Eb-8L@fencepost.gnu.org

Richard Stallman <rms@gnu.org> 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	other threads:[~2003-05-23 19:42 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-05-21 14:47 kill-region Luc Teirlinck
2003-05-22 14:58 ` kill-region Kai Großjohann
2003-05-23 12:03 ` kill-region Richard Stallman
2003-05-23 19:42   ` Kai Großjohann [this message]
  -- strict thread matches above, loose matches on Subject: below --
2003-05-21 15:31 kill-region Luc Teirlinck

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=844r3l4fhw.fsf@lucy.is.informatik.uni-duisburg.de \
    --to=kai.grossjohann@gmx.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).