[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[nongnu] elpa/eat fffca2c06e: Check whether 'yank-transform-functions' i
From: |
ELPA Syncer |
Subject: |
[nongnu] elpa/eat fffca2c06e: Check whether 'yank-transform-functions' is bound |
Date: |
Sun, 11 Dec 2022 07:58:31 -0500 (EST) |
branch: elpa/eat
commit fffca2c06ea5c51fcc6e90e05e67b30a8f5ec6dd
Author: Akib Azmain Turja <akib@disroot.org>
Commit: Akib Azmain Turja <akib@disroot.org>
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.
---
eat.el | 22 ++++++++++++----------
1 file changed, 12 insertions(+), 10 deletions(-)
diff --git a/eat.el b/eat.el
index 941e3d7d50..deecfce428 100644
--- a/eat.el
+++ b/eat.el
@@ -4581,11 +4581,12 @@ 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))
- (with-temp-buffer
- (setq-local yank-transform-functions yank-hook)
- (yank arg)
- (buffer-string))))))
+ eat--terminal
+ (let ((yank-hook (bound-and-true-p yank-transform-functions)))
+ (with-temp-buffer
+ (setq-local yank-transform-functions yank-hook)
+ (yank arg)
+ (buffer-string))))))
(defun eat-yank-from-kill-ring (string &optional arg)
"Same as `yank-from-kill-ring', but for Eat.
@@ -4596,11 +4597,12 @@ 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))
- (with-temp-buffer
- (setq-local yank-transform-functions yank-hook)
- (yank-from-kill-ring string arg)
- (buffer-string))))))
+ 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)
+ (buffer-string))))))
;; When changing these keymaps, be sure to update the manual, README
;; and commentary.
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [nongnu] elpa/eat fffca2c06e: Check whether 'yank-transform-functions' is bound,
ELPA Syncer <=