flet/labels support in macroexp
authorRobin Templeton <robin@terpri.org>
Fri, 18 Jul 2014 19:07:44 +0000 (15:07 -0400)
committerRobin Templeton <robin@terpri.org>
Mon, 20 Apr 2015 04:29:02 +0000 (00:29 -0400)
lisp/emacs-lisp/macroexp.el

index 44727da..31e1800 100644 (file)
@@ -203,6 +203,12 @@ Assumes the caller has bound `macroexpand-all-environment'."
                                (macroexp--all-forms body)
                                (cdr form))
                    form))
+      (`(,(and fun (or `flet `labels)) . ,(or `(,bindings . ,body) dontcare))
+       (macroexp--cons fun
+                       (macroexp--cons (macroexp--all-clauses bindings 2)
+                                       (macroexp--all-forms body)
+                                       (cdr form))
+                       form))
       (`(,(and fun `(lambda . ,_)) . ,args)
        ;; Embedded lambda in function position.
        (macroexp--cons (macroexp--all-forms fun 2)