[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: A question about kill-region after reading emacs-lisp-intro

From: Floyd Davidson
Subject: Re: A question about kill-region after reading emacs-lisp-intro
Date: Mon, 23 Feb 2004 04:16:51 -0900
User-agent: gnus 5.10.6/XEmacs 21.4.15/Linux 2.6.0

"Hu Wei" <address@hidden> 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)                         address@hidden

reply via email to

[Prev in Thread] Current Thread [Next in Thread]