Function: macroexp-parse-body

macroexp-parse-body is a byte-compiled function defined in macroexp.el.gz.

Signature

(macroexp-parse-body BODY)

Documentation

Parse a function BODY into (DECLARATIONS . EXPS).

Source Code

;; Defined in /usr/src/emacs/lisp/emacs-lisp/macroexp.el.gz
;;; Handy functions to use in macros.

(defun macroexp-parse-body (body)
  "Parse a function BODY into (DECLARATIONS . EXPS)."
  (let ((decls ()))
    (while (and (cdr body)
                (let ((e (car body)))
                  (or (stringp e)
                      (memq (car-safe e)
                            '(:documentation declare interactive cl-declare)))))
      (push (pop body) decls))
    (cons (nreverse decls) body)))