From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: Floyd Davidson Newsgroups: gmane.emacs.help Subject: Re: A question about kill-region after reading emacs-lisp-intro Date: Mon, 23 Feb 2004 04:16:51 -0900 Organization: __________ Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Message-ID: <87znbaq6kc.fld@barrow.com> References: NNTP-Posting-Host: deer.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit X-Trace: sea.gmane.org 1077543383 20877 80.91.224.253 (23 Feb 2004 13:36:23 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Mon, 23 Feb 2004 13:36:23 +0000 (UTC) Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Mon Feb 23 14:36:19 2004 Return-path: Original-Received: from monty-python.gnu.org ([199.232.76.173]) by deer.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 1AvGFu-0005u8-00 for ; Mon, 23 Feb 2004 14:36:18 +0100 Original-Received: from localhost ([127.0.0.1] helo=monty-python.gnu.org) by monty-python.gnu.org with esmtp (Exim 4.30) id 1AvGCp-0003gu-9W for geh-help-gnu-emacs@m.gmane.org; Mon, 23 Feb 2004 08:33:07 -0500 Original-Path: shelby.stanford.edu!newsfeed.stanford.edu!headwall.stanford.edu!newshub.sdsu.edu!elnk-nf2-pas!elnk-pas-nf1!newsfeed.earthlink.net!news-out.visi.com!petbe.visi.com!news.octanews.net!ash.uu.net!falcon.america.net!eagle.america.net.POSTED!not-for-mail Original-Newsgroups: gnu.emacs.help User-Agent: gnus 5.10.6/XEmacs 21.4.15/Linux 2.6.0 Cancel-Lock: sha1:7SmwxdYFPnz9xB38ZWDHZla2nis= Original-Lines: 26 Original-NNTP-Posting-Host: 209.124.156.174 Original-X-Trace: eagle.america.net 1077542252 209.124.156.174 (Mon, 23 Feb 2004 08:17:32 EST) Original-NNTP-Posting-Date: Mon, 23 Feb 2004 08:17:32 EST Original-Xref: shelby.stanford.edu gnu.emacs.help:121140 Original-To: help-gnu-emacs@gnu.org X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.2 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: main.gmane.org gmane.emacs.help:17091 X-Report-Spam: http://spam.gmane.org/gmane.emacs.help:17091 "Hu Wei" wrote: >In the body of kill-region there is a statement as > (when string > (if (eq last-command 'kill-region) > ;; if true, prepend string > (kill-append string (< end beg)) > (kill-new string))) > >The purpose is "The if expression checks whether the previous command was >kill-region. If it was, concatenates a copy of the newly clipped text to the >just previously clipped text in the kill ring. If you then yank back the >text, i.e., `paste' it, you get both pieces of text at once. That way, if >you delete two words in a row, and then yank them back, you get both words, >in their proper order, with one yank. (The (< end beg)) expression makes >sure the order is correct.)" > >But how can I delete two words in a row£żI have to set mark between two >deletions, and this would cause last-command to change. Is there some >advanced function I don't know? You can precede any kill command with append-next-kill to get the same effect as two sequential kill commands. -- Floyd L. Davidson Ukpeagvik (Barrow, Alaska) floyd@barrow.com