Check whether 'yank-transform-functions' is bound
* eat.el (eat-yank, eat-yank-from-kill-ring): Check whether 'yank-transform-functions' is bound before using it's value. The variable is not available in Emacs 28.
This commit is contained in:
parent
731ead9bfb
commit
fffca2c06e
1 changed files with 12 additions and 10 deletions
6
eat.el
6
eat.el
|
@ -4581,7 +4581,8 @@ ARG is passed to `yank', which see."
|
|||
(when eat--terminal
|
||||
(funcall eat--synchronize-scroll-function)
|
||||
(eat-send-string-as-yank
|
||||
eat--terminal (let ((yank-hook yank-transform-functions))
|
||||
eat--terminal
|
||||
(let ((yank-hook (bound-and-true-p yank-transform-functions)))
|
||||
(with-temp-buffer
|
||||
(setq-local yank-transform-functions yank-hook)
|
||||
(yank arg)
|
||||
|
@ -4596,7 +4597,8 @@ STRING and ARG are passed to `yank-pop', which see."
|
|||
(when eat--terminal
|
||||
(funcall eat--synchronize-scroll-function)
|
||||
(eat-send-string-as-yank
|
||||
eat--terminal (let ((yank-hook yank-transform-functions))
|
||||
eat--terminal
|
||||
(let ((yank-hook (bound-and-true-p yank-transform-functions)))
|
||||
(with-temp-buffer
|
||||
(setq-local yank-transform-functions yank-hook)
|
||||
(yank-from-kill-ring string arg)
|
||||
|
|
Loading…
Add table
Reference in a new issue