(define-compiler-macro): Handle empty arglist.
This commit is contained in:
parent
5428ee0299
commit
16c9c10f0f
1 changed files with 2 additions and 2 deletions
|
@ -2440,9 +2440,9 @@ compiler macros are expanded repeatedly until no further expansions are
|
|||
possible. Unlike regular macros, BODY can decide to \"punt\" and leave the
|
||||
original function call alone by declaring an initial `&whole foo' parameter
|
||||
and then returning foo."
|
||||
(let ((p (if (listp args) args (list '&rest args))) (res nil))
|
||||
(let ((p args) (res nil))
|
||||
(while (consp p) (cl-push (cl-pop p) res))
|
||||
(setq args (nreverse res)) (setcdr res (and p (list '&rest p))))
|
||||
(setq args (nconc (nreverse res) (and p (list '&rest p)))))
|
||||
(list 'eval-when '(compile load eval)
|
||||
(cl-transform-function-property
|
||||
func 'cl-compiler-macro
|
||||
|
|
Loading…
Add table
Reference in a new issue