Subject: bug#19814: 24.4; pcase-lambda

From: Leo Liu <[email-masked]>
Date: Mon, 09 Feb 2015 09:14:30 +0800

On 2015-02-09 03:18 +0800, Stefan Monnier wrote:
> Maybe it'd be better to just splitting the body into 2 parts:
> - "declarations", which would include docstrings, `declare's, and interactive
> - code.

Coincidentally I have done just that locally :)

(defun macroexp-parse-body (exps)
  "Parse EXPS into ((DOC DECLARE-FORM INTERACTIVE-FORM) . BODY)."
  `((,(and (stringp (car exps))
           (pop exps))
     ,(and (eq (car-safe (car exps)) 'declare)
           (pop exps))
     ,(and (eq (car-safe (car exps)) 'interactive)
           (pop exps)))
    ,@exps))

Leo