yank - Paste (copy) kill buffer contents into buffer
n yank (C-y)
When a non negative argument is supplied to yank, the command copies the contents of the kill buffer n times into the current buffer at the current cursor position. This does not clear the kill buffer, and therefore may be used to make multiple copies of a section of text. On windowing systems which support clip-boards, such as windows and X-terms, MicroEmacs will also cut to and paste from the global clip-board.
If yank is IMMEDIATELY followed by a reyank(2) then the yanked text is replaced by text of the next entry in the kill ring. (another reyank replaces the text with the previous reyank text and so on).
If an -ve argument is given, yank removes the last 0-n items from the kill ring.
Text is inserted into the kill buffer by one of the following commands:-
backward-kill-word(2), copy-region(2), forward-kill-word(2), kill-line(2), kill-paragraph(2), kill-region(2), forward-delete-char(2), backward-delete-char(2).
All the above commands (except copy-region) cut text out of the buffer, the last 2 commands require the letter(2m) mode enabled to add the text to the kill buffer. If any of these commands are executed immediately after any other (including itself) or the @cl(4) variable is set to one of these command, the new kill text is appended to the last kill buffer text.
Windowing systems such as X-Windows and Microsoft Windows utilize a global windowing kill buffer allowing data to be moved between windowing applications (cut buffer and clipboard, respectively). Within these environments MicroEmacs '99 automatically interacts with the windowing systems kill buffer, the last MicroEmacs '99 kill buffer entry is immediately available for a paste operation into another application (regardless of how it was inserted into the kill buffer). Conversely, data placed in the windowing kill buffer is available to MicroEmacs '99, via yank, until a new item has been inserted into the kill buffer (the data may still be available via reyank(2)).
The following example is a basic macro code implementation of the transpose-lines(2) command,
beginning-of-line kill-line forward-line yank -1 yank backward-line
Note that similar to transpose-lines it does not leave the moved line in the kill buffer, effectively tidying up after itself.
(c) Copyright JASSPA 1999
Last Modified: 1999/03/09
Generated On: 1999/12/01