aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--lisp/emacs-lisp/cl-macs.el16
1 files changed, 7 insertions, 9 deletions
diff --git a/lisp/emacs-lisp/cl-macs.el b/lisp/emacs-lisp/cl-macs.el
index 299cffc83aa..ce54337a3b1 100644
--- a/lisp/emacs-lisp/cl-macs.el
+++ b/lisp/emacs-lisp/cl-macs.el
@@ -1886,15 +1886,13 @@ This is like `cl-flet', but for macros instead of functions.
1886 cl-declarations body))) 1886 cl-declarations body)))
1887 (if (cdr bindings) 1887 (if (cdr bindings)
1888 `(cl-macrolet (,(car bindings)) (cl-macrolet ,(cdr bindings) ,@body)) 1888 `(cl-macrolet (,(car bindings)) (cl-macrolet ,(cdr bindings) ,@body))
1889 (let ((progn-maybe (lambda (body) 1889 (if (null bindings) (macroexp-progn body)
1890 (if (cdr body) (cons 'progn body) (car body))))) 1890 (let* ((name (caar bindings))
1891 (if (null bindings) (funcall progn-maybe body) 1891 (res (cl--transform-lambda (cdar bindings) name)))
1892 (let* ((name (caar bindings)) 1892 (eval (car res))
1893 (res (cl--transform-lambda (cdar bindings) name))) 1893 (macroexpand-all (macroexp-progn body)
1894 (eval (car res)) 1894 (cons (cons name `(lambda ,@(cdr res)))
1895 (macroexpand-all (funcall progn-maybe body) 1895 macroexpand-all-environment))))))
1896 (cons (cons name `(lambda ,@(cdr res)))
1897 macroexpand-all-environment)))))))
1898 1896
1899(defconst cl--old-macroexpand 1897(defconst cl--old-macroexpand
1900 (if (and (boundp 'cl--old-macroexpand) 1898 (if (and (boundp 'cl--old-macroexpand)