[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: master c9a8a47ba4: Add new user option 'yank-transform-functions'
From: |
Lars Ingebrigtsen |
Subject: |
Re: master c9a8a47ba4: Add new user option 'yank-transform-functions' |
Date: |
Tue, 24 May 2022 18:02:11 +0200 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (gnu/linux) |
Stefan Monnier <monnier@iro.umontreal.ca> writes:
>> * lisp/simple.el (yank-transform-functions): New user option.
>> (yank): Mention it.
>
> Hmm... why is this a user option?
> [ Also, tho less importantly: Why is it a list of functions instead of
> being symmetric with Emacs-28's `kill-transform-function`? ]
>
> Are users expected to be able to make use of this with Custom? How?
It's a list of functions because it's a defcustom, really. I envisioned
that people might be wanting to add other things to it to (say) record
yanked text, for instance.
>> +@lisp
>> +(defun yank-with-clean-whitespace ()
>> + (interactive)
>> + (let ((yank-transform-functions
>> + '(string-clean-whitespace)))
>> + (call-interactively #'yank)))
>> +@end lisp
>> +@end defopt
>
> This example doesn't call for a `defcustom` but for a `defvar`, no?
It's in the lispref manual.
--
(domestic pets only, the antidote for overdose, milk.)
bloggy blog: http://lars.ingebrigtsen.no