[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#19814: 24.4; pcase-lambda
From: |
Stefan Monnier |
Subject: |
bug#19814: 24.4; pcase-lambda |
Date: |
Sun, 08 Feb 2015 23:27:49 -0500 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/25.0.50 (gnu/linux) |
>> 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))
No, I meant (DECLS . BODY) such that
(let ((x (macroexp-parse-body body)))
(append (car x) (cdr x)))
return something `equal' to `body'.
Stefan