# HG changeset patch # User Richard M. Stallman # Date 885436008 0 # Node ID df2745fa699994ebe276f5fc8b071b47fe8f5705 # Parent e87544dbfacb28f9bd1561d551154fea225ac31f (define-compiler-macro): Handle empty arglist. diff -r e87544dbfacb -r df2745fa6999 lisp/emacs-lisp/cl-macs.el --- a/lisp/emacs-lisp/cl-macs.el Thu Jan 22 02:23:21 1998 +0000 +++ b/lisp/emacs-lisp/cl-macs.el Thu Jan 22 02:26:48 1998 +0000 @@ -2440,9 +2440,9 @@ 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