From: Lars Ingebrigtsen Date: Wed, 25 May 2022 12:23:56 +0000 (+0200) Subject: Make yank-transform-functions into defvar X-Git-Tag: emacs-29.0.90~1910^2~431 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=ce79fe451d845c09e5502071f9af9845eb930885;p=emacs.git 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. --- diff --git a/doc/lispref/text.texi b/doc/lispref/text.texi index 4439bc48658..622f03d2a85 100644 --- a/doc/lispref/text.texi +++ b/doc/lispref/text.texi @@ -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 diff --git a/etc/NEWS b/etc/NEWS index 857f300384d..92ebe220166 100644 --- a/etc/NEWS +++ b/etc/NEWS @@ -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'. diff --git a/lisp/simple.el b/lisp/simple.el index 3318ac4731c..4fd6ea009d2 100644 --- a/lisp/simple.el +++ b/lisp/simple.el @@ -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