* lisp/emacs-lisp/macroexp.el (macroexp-parse-body): Handle cl-declare

and :documentation.  Change return value format accordingly.
* lisp/emacs-lisp/cl-generic.el (cl--generic-lambda):
* lisp/emacs-lisp/pcase.el (pcase-lambda): Adjust accordingly.
* lisp/emacs-lisp/cl-macs.el (cl--transform-lambda): Use macroexp-parse-body.
This commit is contained in:
Stefan Monnier 2015-02-22 23:50:03 -05:00
parent 3f006e1d47
commit e846bbf360
5 changed files with 36 additions and 30 deletions

View file

@ -278,7 +278,7 @@ This macro can only be used within the lexical scope of a cl-generic method."
(uses-cnm (cl--generic-fgrep (list cnm nmp) nbody)))
(cons (not (not uses-cnm))
`#'(lambda (,@(if uses-cnm (list cnm)) ,@args)
,@(delq nil (car parsed-body))
,@(car parsed-body)
,(if (not (memq nmp uses-cnm))
nbody
`(let ((,nmp (lambda ()