all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* A question about kill-region after reading emacs-lisp-intro
@ 2004-02-23 12:04 Hu Wei
  2004-02-23 13:16 ` Floyd Davidson
  2004-02-24  8:47 ` Kai Grossjohann
  0 siblings, 2 replies; 3+ messages in thread
From: Hu Wei @ 2004-02-23 12:04 UTC (permalink / raw)


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain, Size: 988 bytes --]

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/

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2004-02-24  8:47 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-02-23 12:04 A question about kill-region after reading emacs-lisp-intro Hu Wei
2004-02-23 13:16 ` Floyd Davidson
2004-02-24  8:47 ` Kai Grossjohann

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.