changeset 20750:df2745fa6999

(define-compiler-macro): Handle empty arglist.
author Richard M. Stallman <rms@gnu.org>
date Thu, 22 Jan 1998 02:26:48 +0000
parents e87544dbfacb
children b8fbd605fd11
files lisp/emacs-lisp/cl-macs.el
diffstat 1 files changed, 2 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- 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