summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRichard M. Stallman <rms@gnu.org>1998-01-22 02:26:48 +0000
committerRichard M. Stallman <rms@gnu.org>1998-01-22 02:26:48 +0000
commite933cf961cb4a378c651a0fa456034297291f040 (patch)
treee96c6b9873624f4e6564fb3f920dc37c0c49a711
parent89051bf67612ac5fc6066098edab9b28768dcf79 (diff)
downloademacs-e933cf961cb4a378c651a0fa456034297291f040.tar.gz
(define-compiler-macro): Handle empty arglist.
-rw-r--r--lisp/emacs-lisp/cl-macs.el4
1 files changed, 2 insertions, 2 deletions
diff --git a/lisp/emacs-lisp/cl-macs.el b/lisp/emacs-lisp/cl-macs.el
index 37d02b564cb..e6656a168b1 100644
--- a/lisp/emacs-lisp/cl-macs.el
+++ b/lisp/emacs-lisp/cl-macs.el
@@ -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