Subject: bug#12371: macroexp--funcall-if-compiled broke bootstrap for me

From: Troels Nielsen <[email-masked]>
Date: Thu, 20 Sep 2012 10:21:00 +0200

I've run into the same problems this morning, and this patch solves
the problems for me:

The first one I think just is a line gone missing. The next chunk
extracts (car form) before it's to late, as form goes about being
changed before the closure is being called.

Kind Regards
Troels Nielsen

=== modified file 'lisp/calc/calc.el'
--- lisp/calc/calc.el	2012-09-20 03:44:57 +0000
+++ lisp/calc/calc.el	2012-09-20 07:50:18 +0000
@@ -914,9 +914,9 @@

 ;; Set up the autoloading linkage.
 (let ((name (and (fboundp 'calc-dispatch)
-                 (autoloadp (symbol-function 'calc-dispatch))))
+                 (autoloadp (symbol-function 'calc-dispatch))
+                 (nth 1 (symbol-function 'calc-dispatch))))
       (p load-path))
   ;; If Calc files exist on the load-path, we're all set.
   (while (and p (not (file-exists-p
                       (expand-file-name "calc-misc.elc" (car p)))))

=== modified file 'lisp/emacs-lisp/macroexp.el'
--- lisp/emacs-lisp/macroexp.el	2012-09-20 03:29:41 +0000
+++ lisp/emacs-lisp/macroexp.el	2012-09-20 07:51:54 +0000
@@ -148,10 +148,11 @@
                      (car-safe form)
                      (symbolp (car form))
                      (get (car form) 'byte-obsolete-info))
-                (macroexp--funcall-and-return
-                 (lambda () (byte-compile-warn-obsolete (car form)))
-                 #'ignore      ;FIXME: We should `message' something.
-                 new-form)
+                (let ((sym (car form)))
+                  (macroexp--funcall-and-return
+                   (lambda () (byte-compile-warn-obsolete sym))
+                   #'ignore      ;FIXME: We should `message' something.
+                   new-form))
               new-form)))
     (pcase form
       (`(cond . ,clauses)