Make yank-transform-functions into defvar

* doc/lispref/text.texi (Yanking): Adjust.
* lisp/simple.el (yank-transform-functions): Make into defvar
because it's not that useful as a user option.
This commit is contained in:
Lars Ingebrigtsen 2022-05-25 14:23:56 +02:00
parent 0a79e28891
commit ce79fe451d
3 changed files with 6 additions and 9 deletions

View file

@ -1111,7 +1111,7 @@ or specifying key bindings. It takes effect after
@code{yank-handled-properties}.
@end defopt
@defopt yank-transform-functions
@defvar yank-transform-functions
This variable is a list of functions. Each function is called (in
order) with the string to be yanked as the argument, and should
return a (possibly transformed) string. This variable can be set
@ -1127,7 +1127,7 @@ could say something like:
'(string-clean-whitespace)))
(call-interactively #'yank)))
@end lisp
@end defopt
@end defvar
@node Yank Commands
@subsection Functions for Yanking

View file

@ -2268,8 +2268,8 @@ This command lets you examine all data in the current selection and
the clipboard, and insert it into the buffer.
+++
** New user option 'yank-transform-functions'.
This function allows the user to alter the string to be inserted.
** New variable 'yank-transform-functions'.
This variable allows the user to alter the string to be inserted.
---
** New command 'yank-in-context'.

View file

@ -5946,17 +5946,14 @@ See also `yank-handled-properties'."
:group 'killing
:version "24.3")
(defcustom yank-transform-functions nil
(defvar yank-transform-functions nil
"Hook run on strings to be yanked.
Each function in this list will be called (in order) with the
string to be yanked as the sole argument, and should return the (possibly)
transformed string.
The functions will be called with the destination buffer as the current
buffer, and with point at the place where the string is to be inserted."
:type 'hook
:version "29.1"
:group 'killing)
buffer, and with point at the place where the string is to be inserted.")
(defvar yank-window-start nil)
(defvar yank-undo-function nil