From: Stefan Monnier Date: Tue, 21 Dec 2021 04:14:03 +0000 (-0500) Subject: lisp/emacs-lisp/cl-macs.el: Align with `master` X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=e9cfab679d3fe449e12d3557db7bf6628ee0b971;p=emacs.git lisp/emacs-lisp/cl-macs.el: Align with `master` --- diff --git a/lisp/emacs-lisp/cl-macs.el b/lisp/emacs-lisp/cl-macs.el index bc837e5bf38..13ca38fe60b 100644 --- a/lisp/emacs-lisp/cl-macs.el +++ b/lisp/emacs-lisp/cl-macs.el @@ -315,19 +315,17 @@ FORM is of the form (ARGS . BODY)." (when (memq '&optional simple-args) (cl-decf slen)) (setq header - (cond - ((eq :documentation (car-safe (car header))) - `((:documentation (docstring-add-fundoc-usage - ,(cadr (car header)) - ,usage-str)) - ,@(cdr header))) - (t - (cons (docstring-add-fundoc-usage - (if (stringp (car header)) (pop header)) - ;; Be careful with make-symbol and (back)quote, - ;; see bug#12884. - usage-str) - header)))) + (cons + (if (eq :documentation (car-safe (car header))) + `(:documentation (docstring-add-fundoc-usage + ,(cadr (pop header)) + ,usage-str)) + (docstring-add-fundoc-usage + (if (stringp (car header)) (pop header)) + ;; Be careful with make-symbol and (back)quote, + ;; see bug#12884. + usage-str)) + header)) ;; FIXME: we'd want to choose an arg name for the &rest param ;; and pass that as `expr' to cl--do-arglist, but that ends up ;; generating code with a redundant let-binding, so we instead