summaryrefslogtreecommitdiff
path: root/lisp/emacs-lisp
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
commit16c9c10f0ffeabcd838ced945dbb9da819899345 (patch)
treec55c70a9fb5ef2e2ef04fd3f30c807c6896e4826 /lisp/emacs-lisp
parent5428ee0299d1a757ed2459342104354b1ab98708 (diff)
downloademacs-16c9c10f0ffeabcd838ced945dbb9da819899345.tar.gz
emacs-16c9c10f0ffeabcd838ced945dbb9da819899345.tar.bz2
emacs-16c9c10f0ffeabcd838ced945dbb9da819899345.zip
(define-compiler-macro): Handle empty arglist.
Diffstat (limited to 'lisp/emacs-lisp')
-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