From: Floyd Davidson <floyd@barrow.com>
Subject: Re: A question about kill-region after reading emacs-lisp-intro
Date: Mon, 23 Feb 2004 04:16:51 -0900 [thread overview]
Message-ID: <87znbaq6kc.fld@barrow.com> (raw)
In-Reply-To: c1cq2t$8te$1@mail.cn99.com
"Hu Wei" <roy@mail.ustc.edu.cn> 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 <http://web.newsguy.com/floyd_davidson>
Ukpeagvik (Barrow, Alaska) floyd@barrow.com
next prev parent reply other threads:[~2004-02-23 13:16 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-02-23 12:04 A question about kill-region after reading emacs-lisp-intro Hu Wei
2004-02-23 13:16 ` Floyd Davidson [this message]
2004-02-24 8:47 ` Kai Grossjohann
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=87znbaq6kc.fld@barrow.com \
--to=floyd@barrow.com \
/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.
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).