From e9cfab679d3fe449e12d3557db7bf6628ee0b971 Mon Sep 17 00:00:00 2001 From: Stefan Monnier Date: Mon, 20 Dec 2021 23:14:03 -0500 Subject: [PATCH] lisp/emacs-lisp/cl-macs.el: Align with `master` --- lisp/emacs-lisp/cl-macs.el | 24 +++++++++++------------- 1 file changed, 11 insertions(+), 13 deletions(-) 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 -- 2.39.5