branch: elpa/with-simulated-input
commit 4abf2f0e6b1f558a783da6c0e90c81641a51e552
Author: Ryan C. Thompson <[email protected]>
Commit: Ryan C. Thompson <[email protected]>

    Replace def-form with form in debug declaration
    
    Per the Elisp manual, "def-form" is only valid after a "&define".
---
 with-simulated-input.el | 21 ++++++++++++---------
 1 file changed, 12 insertions(+), 9 deletions(-)

diff --git a/with-simulated-input.el b/with-simulated-input.el
index 4a714c56d7..d1ea286e37 100644
--- a/with-simulated-input.el
+++ b/with-simulated-input.el
@@ -103,13 +103,15 @@ to check."
 ;;;###autoload
 (defun with-simulated-input-1 (main &rest keys)
   "Internal `with-simulated-input' helper.
-KEYS is a keylist as can be passed to that function (except that
-only a list is allowed, and forms must be functions) and MAIN is
-the body form as a function."
+
+MAIN is a zero-argument function containing the body forms to be
+evaluated, and KEYS is a list of key sequences (as strings) or
+other actions to simulate user interaction (as zero-argument
+functions, which are called only for their side effects)."
   (let* ((next-action-key (wsi-get-unbound-key))
          ;; Ensure we don't interfere with any outside catching.
-         (result-sym (make-symbol "with-simulated-input-result"))
-         (error-sym (make-symbol "with-simulated-input-error"))
+         (result-sym (make-symbol "result"))
+         (error-sym (make-symbol "error"))
          (orig-buf (current-buffer))
          (actions
           (nconc
@@ -179,12 +181,13 @@ 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)) ; quoted list of 
string-or-form
-                (&rest &or stringp def-form) ; un-quoted same
-                stringp symbolp         ; literal string; variable name (or 
nil)
+   (debug ([&or ("quote" (&rest &or stringp form)) ; quoted list of 
string-or-form
+                (&rest &or stringp form) ; un-quoted same
+                stringp                  ; literal string
+                symbolp                  ; variable name (or nil)
                 ([&or functionp macrop] &rest form) ; arbitrary lisp function 
call
                 ]
-           def-body)))
+           body)))
   ;; TODO Warn on empty body
   ;; TODO Support integers (i.e. single characters) in KEYS
   (cond

Reply via email to