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

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

[nongnu] elpa/with-simulated-input 0aeff5f17f 079/134: `with-simulated-i


From: ELPA Syncer
Subject: [nongnu] elpa/with-simulated-input 0aeff5f17f 079/134: `with-simulated-input': remove legacy syntax
Date: Mon, 10 Jan 2022 23:00:07 -0500 (EST)

branch: elpa/with-simulated-input
commit 0aeff5f17f109126ca6372f759b1f1aff786fc1a
Author: Nikita Bloshchanevich <nikblos@outlook.com>
Commit: Nikita Bloshchanevich <nikblos@outlook.com>

    `with-simulated-input': remove legacy syntax
    
    - (list ...) will no longer work in KEYS
    - Variables still work though (as an implementation detail)
---
 with-simulated-input.el | 19 +++++--------------
 1 file changed, 5 insertions(+), 14 deletions(-)

diff --git a/with-simulated-input.el b/with-simulated-input.el
index 36613cd817..8e86019899 100644
--- a/with-simulated-input.el
+++ b/with-simulated-input.el
@@ -173,25 +173,16 @@ 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 def-form))
-                                   ("list" [&rest &or stringp ("quote" 
def-form) form])
-                                   ([&not symbolp] &rest &or stringp def-form)
-                                   form]
+  (declare (indent 1) (debug ([&or ("quote" (&rest &or stringp symbolp 
def-form))
+                                   (&rest &or stringp symbolp def-form)]
                               def-body)))
-  ;; (...) is supposed to be like '(), unless it is a function call or
-  ;; quote/list expression
-  (when (and (listp keys) (not (symbolp (car keys))))
-    (setq keys `(quote ,keys)))
   (pcase keys
-    (`(quote ,x) (setq keys (cl-loop for key in x collect (if (consp key) 
`',key key))))
-    (`(list . ,keys) (cl-callf cdr keys))
-    ((or (guard (not (listp keys))) (guard (symbolp (car keys)))) (cl-callf 
list keys)))
+    (`(quote ,x) (setq keys x))
+    ((guard (not (listp keys))) (cl-callf list keys)))
   `(with-simulated-input-1
     (lambda ()
       ,@body)
-    ,@(cl-loop for key in keys collect (pcase key
-                                         (`(quote ,x) `(lambda () ,x))
-                                         (x x)))))
+    ,@(cl-loop for key in keys collect (if (consp key) `(lambda () ,key) 
key))))
 
 (defvar wsi-simulated-idle-time nil
   "The current simulated idle time.



reply via email to

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