make macro errors less verbose
[bpt/emacs.git] / lisp / emacs-lisp / macroexp.el
index 44727da..55e2ebf 100644 (file)
@@ -98,10 +98,8 @@ each clause."
   (condition-case err
       (apply handler form (cdr form))
     (error
-     (message "--------------------------------------------------")
-     (backtrace)
      (message "Compiler-macro error for %S: %S" (car form) err)
-           form)))
+     form)))
 
 (defun macroexp--funcall-if-compiled (_form)
   "Pseudo function used internally by macroexp to delay warnings.
@@ -203,6 +201,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)