branch: elpa/with-simulated-input
commit 2a4866984a7d4d7e185e2f61b1df0fa76c54dcb6
Author: Nikita Bloshchanevich <[email protected]>
Commit: Nikita Bloshchanevich <[email protected]>
No longer handle variables specially in KEYS
Variables are now regular DEF-FORMS whose value is silently ignored.
---
tests/test-with-simulated-input.el | 2 +-
with-simulated-input.el | 6 +++---
2 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/tests/test-with-simulated-input.el
b/tests/test-with-simulated-input.el
index d2d8a4dd60..058df890ed 100644
--- a/tests/test-with-simulated-input.el
+++ b/tests/test-with-simulated-input.el
@@ -118,7 +118,7 @@
(let ((greeting "hello")
(target "world"))
(expect
- (with-simulated-input '(greeting "SPC" (insert target) "RET")
+ (with-simulated-input '((insert greeting) "SPC" (insert target) "RET")
(read-string "Say hello: "))
:to-equal "hello world")))
diff --git a/with-simulated-input.el b/with-simulated-input.el
index 8e86019899..6410184108 100644
--- a/with-simulated-input.el
+++ b/with-simulated-input.el
@@ -173,8 +173,8 @@ are propagated normally.
The return value is the last form in BODY, as if it was wrapped
in `progn'."
- (declare (indent 1) (debug ([&or ("quote" (&rest &or stringp symbolp
def-form))
- (&rest &or stringp symbolp def-form)]
+ (declare (indent 1) (debug ([&or ("quote" (&rest &or stringp def-form))
+ (&rest &or stringp def-form)]
def-body)))
(pcase keys
(`(quote ,x) (setq keys x))
@@ -182,7 +182,7 @@ in `progn'."
`(with-simulated-input-1
(lambda ()
,@body)
- ,@(cl-loop for key in keys collect (if (consp key) `(lambda () ,key)
key))))
+ ,@(cl-loop for key in keys collect (if (stringp key) key `(lambda ()
,key)))))
(defvar wsi-simulated-idle-time nil
"The current simulated idle time.