* emacs-lisp/cl-macs.el (cl-macrolet): Simplify last change.
This commit is contained in:
parent
dd97cafcf2
commit
d4e355b45d
1 changed files with 7 additions and 9 deletions
|
@ -1886,15 +1886,13 @@ This is like `cl-flet', but for macros instead of functions.
|
|||
cl-declarations body)))
|
||||
(if (cdr bindings)
|
||||
`(cl-macrolet (,(car bindings)) (cl-macrolet ,(cdr bindings) ,@body))
|
||||
(let ((progn-maybe (lambda (body)
|
||||
(if (cdr body) (cons 'progn body) (car body)))))
|
||||
(if (null bindings) (funcall progn-maybe body)
|
||||
(let* ((name (caar bindings))
|
||||
(res (cl--transform-lambda (cdar bindings) name)))
|
||||
(eval (car res))
|
||||
(macroexpand-all (funcall progn-maybe body)
|
||||
(cons (cons name `(lambda ,@(cdr res)))
|
||||
macroexpand-all-environment)))))))
|
||||
(if (null bindings) (macroexp-progn body)
|
||||
(let* ((name (caar bindings))
|
||||
(res (cl--transform-lambda (cdar bindings) name)))
|
||||
(eval (car res))
|
||||
(macroexpand-all (macroexp-progn body)
|
||||
(cons (cons name `(lambda ,@(cdr res)))
|
||||
macroexpand-all-environment))))))
|
||||
|
||||
(defconst cl--old-macroexpand
|
||||
(if (and (boundp 'cl--old-macroexpand)
|
||||
|
|
Loading…
Add table
Reference in a new issue