emacs-elpa-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[nongnu] elpa/with-simulated-input 7f37451dcf 019/134: Use closures inst


From: ELPA Syncer
Subject: [nongnu] elpa/with-simulated-input 7f37451dcf 019/134: Use closures instead of quoted expressions
Date: Mon, 10 Jan 2022 23:00:00 -0500 (EST)

branch: elpa/with-simulated-input
commit 7f37451dcfbb1873f605e2a412d0585f5c3bed49
Author: Ryan C. Thompson <rct@thompsonclan.org>
Commit: Ryan C. Thompson <rct@thompsonclan.org>

    Use closures instead of quoted expressions
---
 with-simulated-input.el | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/with-simulated-input.el b/with-simulated-input.el
index decd5f94ef..290d2f45ee 100644
--- a/with-simulated-input.el
+++ b/with-simulated-input.el
@@ -109,7 +109,7 @@ to check.
    if (stringp action)
    collect action into full-key-sequence
    else
-   collect action into action-list and
+   collect `(lambda () ,action) into action-list and
    collect exec-form-keybind into full-key-sequence
    finally return
    (list :keys (s-join " " full-key-sequence)
@@ -118,7 +118,7 @@ to check.
 (defvar wsi-action-list nil)
 
 (defun wsi-run-next-action ()
-  "Pop and eval the next element in `wsi-action-list'.
+  "Pop and call the next function in `wsi-action-list'.
 
 If the action list is empty, run `(keyboard-quit)' instead."
   (interactive)
@@ -126,7 +126,7 @@ If the action list is empty, run `(keyboard-quit)' instead."
       (if wsi-action-list
           (let ((next-action (pop wsi-action-list)))
             ;; (message "Executing `%S'" next-action)
-            (eval next-action))
+            (funcall next-action))
         (error "Reached end of `wsi-action-list'."))
     (error (throw 'wsi-threw-error err))))
 



reply via email to

[Prev in Thread] Current Thread [Next in Thread]