From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: "Hu Wei" Newsgroups: gmane.emacs.help Subject: A question about kill-region after reading emacs-lisp-intro Date: Mon, 23 Feb 2004 20:04:17 +0800 Organization: Bentium Ltd. (CN99) Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Message-ID: NNTP-Posting-Host: deer.gmane.org X-Trace: sea.gmane.org 1077538759 9109 80.91.224.253 (23 Feb 2004 12:19:19 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Mon, 23 Feb 2004 12:19:19 +0000 (UTC) Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Mon Feb 23 13:19:14 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 1AvF3K-0001AD-00 for ; Mon, 23 Feb 2004 13:19:14 +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 1AvF1K-0005Wv-BL for geh-help-gnu-emacs@m.gmane.org; Mon, 23 Feb 2004 07:17:10 -0500 Original-Path: shelby.stanford.edu!newsfeed.stanford.edu!bloom-beacon.mit.edu!news.cn99.com!not-for-mail Original-Newsgroups: gnu.emacs.help Original-Lines: 25 Original-NNTP-Posting-Host: gateway.infolab.ustc.edu.cn Original-X-Trace: mail.cn99.com 1077537698 9134 202.38.79.66 (23 Feb 2004 12:01:38 GMT) Original-X-Complaints-To: usenet@news.cn99.com Original-NNTP-Posting-Date: Mon, 23 Feb 2004 12:01:38 +0000 (UTC) X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2800.1158 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1165 Original-Xref: shelby.stanford.edu gnu.emacs.help:121139 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:17090 X-Report-Spam: http://spam.gmane.org/gmane.emacs.help:17090 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? ------------------- Yours sincerely, Hu, Wei My CV can be found at http://mail.ustc.edu.cn/~roy/