Yanking means inserting text from the kill ring, but it does not
insert the text blindly. The
yank command, and related
insert-for-yank to perform special processing on
the text before it is inserted.
This function works like
insert, except that it processes the text in string according to the
yank-handlertext property, as well as the variables
yank-excluded-properties(see below), before inserting the result into the current buffer.
This function resembles
insert-buffer-substring, except that it processes the text according to
yank-excluded-properties. (It does not handle the
yank-handlerproperty, which does not normally occur in buffer text anyway.)
If you put a
yank-handler text property on all or part of a
string, that alters how
insert-for-yank inserts the string. If
different parts of the string have different
values (comparison being done with
eq), each substring is
handled separately. The property value must be a list of one to four
elements, with the following format (where elements after the first
may be omitted):
(function param noexclude undo)
Here is what the elements do:
nil, it is called instead of
insertto insert the string, with one argument—the string to insert.
nil, it replaces string (or the substring of string being processed) as the object passed to function (or
insert). For example, if function is
yank-rectangle, param should be a list of strings to insert as a rectangle.
nil, that disables the normal action of
yank-excluded-propertieson the inserted string.
nil, it is a function that will be called by
yank-popto undo the insertion of the current object. It is called with two arguments, the start and end of the current region. function can set
yank-undo-functionto override the undo value.
This variable specifies special text property handling conditions for yanked text. It takes effect after the text has been inserted (either normally, or via the
yank-handlerproperty), and prior to
The value should be an alist of elements
). Each alist element is handled in order. The inserted text is scanned for stretches of text having text properties
eqto prop; for each such stretch, fun is called with three arguments: the value of the property, and the start and end positions of the text.
The value of this variable is the list of properties to remove from inserted text. Its default value contains properties that might lead to annoying results, such as causing the text to respond to the mouse or specifying key bindings. It takes effect after