From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: kai.grossjohann@gmx.net (=?iso-8859-1?q?Kai_Gro=DFjohann?=) Newsgroups: gmane.emacs.devel Subject: Re: kill-region Date: Fri, 23 May 2003 21:42:03 +0200 Organization: University of Duisburg, Germany Sender: emacs-devel-bounces+emacs-devel=quimby.gnus.org@gnu.org Message-ID: <844r3l4fhw.fsf@lucy.is.informatik.uni-duisburg.de> References: <200305211447.h4LElgr08180@eel.dms.auburn.edu> NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: main.gmane.org 1053719619 15175 80.91.224.249 (23 May 2003 19:53:39 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Fri, 23 May 2003 19:53:39 +0000 (UTC) Original-X-From: emacs-devel-bounces+emacs-devel=quimby.gnus.org@gnu.org Fri May 23 21:53:37 2003 Return-path: Original-Received: from quimby.gnus.org ([80.91.224.244]) by main.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 19JIbQ-0003vb-00 for ; Fri, 23 May 2003 21:53:20 +0200 Original-Received: from monty-python.gnu.org ([199.232.76.173]) by quimby.gnus.org with esmtp (Exim 3.12 #1 (Debian)) id 19JInJ-00069H-00 for ; Fri, 23 May 2003 22:05:37 +0200 Original-Received: from localhost ([127.0.0.1] helo=monty-python.gnu.org) by monty-python.gnu.org with esmtp (Exim 4.20) id 19JIV8-0004AO-4z for emacs-devel@quimby.gnus.org; Fri, 23 May 2003 15:46:50 -0400 Original-Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.20) id 19JIUS-0003zW-J6 for emacs-devel@gnu.org; Fri, 23 May 2003 15:46:08 -0400 Original-Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.20) id 19JITK-0003Ys-Nk for emacs-devel@gnu.org; Fri, 23 May 2003 15:44:59 -0400 Original-Received: from main.gmane.org ([80.91.224.249]) by monty-python.gnu.org with esmtp (Exim 4.20) id 19JISV-0002qf-NW for emacs-devel@gnu.org; Fri, 23 May 2003 15:44:07 -0400 Original-Received: from list by main.gmane.org with local (Exim 3.35 #1 (Debian)) id 19JIPn-00031z-00 for ; Fri, 23 May 2003 21:41:19 +0200 Mail-Followup-To: emacs-devel@gnu.org X-Injected-Via-Gmane: http://gmane.org/ Original-To: emacs-devel@gnu.org Original-Received: from news by main.gmane.org with local (Exim 3.35 #1 (Debian)) id 19JIOu-0002zT-00 for ; Fri, 23 May 2003 21:40:24 +0200 Original-Lines: 31 Original-X-Complaints-To: usenet@main.gmane.org Mail-Copies-To: never User-Agent: Gnus/5.1003 (Gnus v5.10.3) Emacs/21.3.50 (gnu/linux) Cancel-Lock: sha1:UvhRTHVavi6D6J89s1OSOjc8tzk= X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1b5 Precedence: list List-Id: Emacs development discussions. List-Help: List-Post: List-Subscribe: , List-Archive: List-Unsubscribe: , Errors-To: emacs-devel-bounces+emacs-devel=quimby.gnus.org@gnu.org Xref: main.gmane.org gmane.emacs.devel:14158 X-Report-Spam: http://spam.gmane.org/gmane.emacs.devel:14158 Richard Stallman 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.