yank-undo-function

yank-undo-function is a variable defined in `simple.el'.
Its value is
nil

  • This variable may be risky if used as a file-local variable.

Documentation:
If non-nil, function used by `yank-pop' to delete last stretch of yanked text.
Function is called with two parameters, START and END corresponding to
the value of the mark and point; it is guaranteed that START <= END.
Normally set from the UNDO element of a yank-handler; see `insert-for-yank'.