aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--lisp/emacs-lisp/macroexp.el10
1 files changed, 6 insertions, 4 deletions
diff --git a/lisp/emacs-lisp/macroexp.el b/lisp/emacs-lisp/macroexp.el
index b5a279bbbf4..b3573d0f3b5 100644
--- a/lisp/emacs-lisp/macroexp.el
+++ b/lisp/emacs-lisp/macroexp.el
@@ -45,15 +45,17 @@
45;; structure of the result with the input. Doing so recursively using 45;; structure of the result with the input. Doing so recursively using
46;; `maybe-cons' results in excessively deep recursion for very long 46;; `maybe-cons' results in excessively deep recursion for very long
47;; input forms. 47;; input forms.
48(defmacro macroexp-accumulate (#1=#:\(var\ list\) &rest body) 48(defmacro macroexp-accumulate (var+list &rest body)
49 "Return a list of the results of evaluating BODY for each element of LIST. 49 "Return a list of the results of evaluating BODY for each element of LIST.
50Evaluate BODY with VAR bound to each `car' from LIST, in turn. 50Evaluate BODY with VAR bound to each `car' from LIST, in turn.
51Return a list of the values of the final form in BODY. 51Return a list of the values of the final form in BODY.
52The list structure of the result will share as much with LIST as 52The list structure of the result will share as much with LIST as
53possible (for instance, when BODY just returns VAR unchanged, the 53possible (for instance, when BODY just returns VAR unchanged, the
54result will be eq to LIST)." 54result will be eq to LIST).
55 (let ((var (car #1#)) 55
56 (list (cadr #1#)) 56\(fn (VAR LIST) BODY...)"
57 (let ((var (car var+list))
58 (list (cadr var+list))
57 (shared (make-symbol "shared")) 59 (shared (make-symbol "shared"))
58 (unshared (make-symbol "unshared")) 60 (unshared (make-symbol "unshared"))
59 (tail (make-symbol "tail")) 61 (tail (make-symbol "tail"))