These functions and variables provide access to the kill ring at a lower level, but still convenient for use in Lisp programs, because they take care of interaction with window system selections (see section Window System Selections).
current-kill
rotates the yanking pointer, which
designates the "front" of the kill ring, by n places (from newer
kills to older ones), and returns the text at that place in the ring.
If the optional second argument do-not-move is non-nil
,
then current-kill
doesn't alter the yanking pointer; it just
returns the nth kill, counting from the current yanking pointer.
If n is zero, indicating a request for the latest kill,
current-kill
calls the value of
interprogram-paste-function
(documented below) before consulting
the kill ring.
interprogram-cut-function
(see below).
nil
, it goes at the beginning. This
function also invokes the value of interprogram-cut-function
(see
below).
nil
or a function of no arguments.
If the value is a function, current-kill
calls it to get the
"most recent kill". If the function returns a non-nil
value,
then that value is used as the "most recent kill". If it returns
nil
, then the first element of kill-ring
is used.
The normal use of this hook is to get the window system's primary selection as the most recent kill, even if the selection belongs to another application. See section Window System Selections.
nil
or a function of one argument.
If the value is a function, kill-new
and kill-append
call
it with the new first element of the kill ring as an argument.
The normal use of this hook is to set the window system's primary selection from the newly killed text. See section Window System Selections.
Go to the first, previous, next, last section, table of contents.