From unknown Tue Aug 19 14:22:06 2025 X-Loop: help-debbugs@gnu.org Subject: bug#28994: 26.0.90; Build error during bootstrap Resent-From: Stefan Monnier Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 25 Oct 2017 15:45:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 28994 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: 28994@debbugs.gnu.org X-Debbugs-Original-To: bug-gnu-emacs@gnu.org Received: via spool by submit@debbugs.gnu.org id=B.150894624913505 (code B ref -1); Wed, 25 Oct 2017 15:45:02 +0000 Received: (at submit) by debbugs.gnu.org; 25 Oct 2017 15:44:09 +0000 Received: from localhost ([127.0.0.1]:33510 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1e7Nqi-0003Vl-R5 for submit@debbugs.gnu.org; Wed, 25 Oct 2017 11:44:09 -0400 Received: from eggs.gnu.org ([208.118.235.92]:47773) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1e7Nqh-0003VW-5w for submit@debbugs.gnu.org; Wed, 25 Oct 2017 11:44:07 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1e7Nqa-0001fx-QH for submit@debbugs.gnu.org; Wed, 25 Oct 2017 11:44:02 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=0.8 required=5.0 tests=BAYES_50 autolearn=disabled version=3.3.2 Received: from lists.gnu.org ([2001:4830:134:3::11]:36217) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1e7Nqa-0001fl-Ms for submit@debbugs.gnu.org; Wed, 25 Oct 2017 11:44:00 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:38739) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1e7NqZ-0000TM-5s for bug-gnu-emacs@gnu.org; Wed, 25 Oct 2017 11:44:00 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1e7NqV-0001X2-RE for bug-gnu-emacs@gnu.org; Wed, 25 Oct 2017 11:43:59 -0400 Received: from chene.dit.umontreal.ca ([132.204.246.20]:47383) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1e7NqV-0001Uz-LP for bug-gnu-emacs@gnu.org; Wed, 25 Oct 2017 11:43:55 -0400 Received: from ceviche.home (lechon.iro.umontreal.ca [132.204.27.242]) by chene.dit.umontreal.ca (8.14.7/8.14.1) with ESMTP id v9PFhrog010983 for ; Wed, 25 Oct 2017 11:43:53 -0400 Received: by ceviche.home (Postfix, from userid 20848) id CCE0266233; Wed, 25 Oct 2017 11:37:58 -0400 (EDT) From: Stefan Monnier Date: Wed, 25 Oct 2017 11:37:58 -0400 Message-ID: MIME-Version: 1.0 Content-Type: text/plain X-NAI-Spam-Flag: NO X-NAI-Spam-Level: X-NAI-Spam-Threshold: 5 X-NAI-Spam-Score: 0.3 X-NAI-Spam-Rules: 5 Rules triggered BEC_TRC1=0.1, BEC_TRC1_W_GEN_SPAM_FEATRE=0.1, GEN_SPAM_FEATRE=0.1, EDT_SA_DN_PASS=0, RV6144=0 X-NAI-Spam-Version: 2.3.0.9418 : core <6144> : inlines <6144> : streams <1768387> : uri <2522246> X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x X-Received-From: 2001:4830:134:3::11 X-Spam-Score: -4.0 (----) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -4.0 (----) Package: Emacs Version: 26.0.90 The following: rm -f src/bootstrap-emacs lisp/progmodes/elisp-mode.elc make triggers the following message: [...] Loading emacs-lisp/lisp-mode... Loading .../lisp/progmodes/elisp-mode.el (source)... Eager macro-expansion failure: (error "Autoloading file .../lisp/emacs-lisp/regexp-opt.elc failed to define function flymake-log") Loading textmodes/text-mode... [...] It's arguably harmless, but the error is undesirable and the error message itself clearly shows we have a bug somewhere in our error reporting. I tracked down the source of the problem to: - autoload-do-load (called to fetch flymake-log) will call `load` telling it to silently ignore errors if flymake is not found. - then, indeed, flymake.el isn't found (because lisp/progmodes is not in load-path in this specific situation). - so after the call to `load` the macro is still not defined and the load-history has no trace of flymake.el since we didn't load it at all, hence the odd error message. The patch below to src/eval.c fixes this problem by: - not signaling an error if the load didn't define the function when we told load not to signal an error anyway (so we don't emit a misleading message about some unrelated file). - not telling load to ignore errors when we're trying to load a macro. So after that patch, we get the real error message: [...] Loading emacs-lisp/lisp-mode... Loading .../lisp/progmodes/elisp-mode.el (source)... Eager macro-expansion failure: (file-missing "Cannot open load file" "Aucun fichier ou dossier de ce type" "flymake") Loading textmodes/text-mode... [...] Which I fix with the patch to lisp/loadup.el. This then bumps into another error, because flymake.el ends up loading edmacro, which loads kmacro which tries to modify query-replace-map which doesn't exist yet, and if we fix that by loading `replace.el` we get yet another error because `replace.el` tries to use text-mode-map which again isn't defined yet, which I fix by loading text-mode. And now it works without signaling an error. Any objection to installing this patch, or suggestion to fix the string of problems some other way? Stefan diff --git a/lisp/kmacro.el b/lisp/kmacro.el index 4abc571db4..5729f2fc8d 100644 --- a/lisp/kmacro.el +++ b/lisp/kmacro.el @@ -111,6 +111,7 @@ ;;; Code: ;; Customization: +(require 'replace) (defgroup kmacro nil "Simplified keyboard macro user interface." diff --git a/lisp/loadup.el b/lisp/loadup.el index d048f0736b..40e5651aa1 100644 --- a/lisp/loadup.el +++ b/lisp/loadup.el @@ -76,6 +76,7 @@ (setq max-lisp-eval-depth 2200) (setq load-path (list (expand-file-name "." dir) (expand-file-name "emacs-lisp" dir) + (expand-file-name "progmodes" dir) (expand-file-name "language" dir) (expand-file-name "international" dir) (expand-file-name "textmodes" dir) diff --git a/lisp/replace.el b/lisp/replace.el index a5548f461d..cdaeb9240a 100644 --- a/lisp/replace.el +++ b/lisp/replace.el @@ -28,6 +28,7 @@ ;;; Code: +(require 'text-mode) (eval-when-compile (require 'cl-lib)) (defcustom case-replace t diff --git a/src/eval.c b/src/eval.c index 52e4c96d4b..063deb4ba0 100644 --- a/src/eval.c +++ b/src/eval.c @@ -1986,12 +1986,10 @@ it defines a macro. */) if (!CONSP (fundef) || !EQ (Qautoload, XCAR (fundef))) return fundef; - if (EQ (macro_only, Qmacro)) - { - Lisp_Object kind = Fnth (make_number (4), fundef); - if (! (EQ (kind, Qt) || EQ (kind, Qmacro))) - return fundef; - } + Lisp_Object kind = Fnth (make_number (4), fundef); + if (EQ (macro_only, Qmacro) + && !(EQ (kind, Qt) || EQ (kind, Qmacro))) + return fundef; /* This is to make sure that loadup.el gives a clear picture of what files are preloaded and when. */ @@ -2014,15 +2012,18 @@ it defines a macro. */) The value saved here is to be restored into Vautoload_queue. */ record_unwind_protect (un_autoload, Vautoload_queue); Vautoload_queue = Qt; - /* If `macro_only', assume this autoload to be a "best-effort", + /* If `macro_only' is set and fundef isn't a macro, assume this autoload to + be a "best-effort" (e.g. to try and find a compiler macro), so don't signal an error if autoloading fails. */ - Fload (Fcar (Fcdr (fundef)), macro_only, Qt, Qnil, Qt); + Lisp_Object ignore_errors + = (EQ (kind, Qt) || EQ (kind, Qmacro)) ? Qnil : macro_only; + Fload (Fcar (Fcdr (fundef)), ignore_errors, Qt, Qnil, Qt); /* Once loading finishes, don't undo it. */ Vautoload_queue = Qt; unbind_to (count, Qnil); - if (NILP (funname)) + if (NILP (funname) || !NILP (ignore_errors)) return Qnil; else { From unknown Tue Aug 19 14:22:06 2025 X-Loop: help-debbugs@gnu.org Subject: bug#28994: 26.0.90; Build error during bootstrap Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 25 Oct 2017 16:10:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 28994 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Stefan Monnier Cc: 28994@debbugs.gnu.org Reply-To: Eli Zaretskii Received: via spool by 28994-submit@debbugs.gnu.org id=B28994.150894776716130 (code B ref 28994); Wed, 25 Oct 2017 16:10:02 +0000 Received: (at 28994) by debbugs.gnu.org; 25 Oct 2017 16:09:27 +0000 Received: from localhost ([127.0.0.1]:33534 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1e7OFD-0004C6-6o for submit@debbugs.gnu.org; Wed, 25 Oct 2017 12:09:27 -0400 Received: from eggs.gnu.org ([208.118.235.92]:56157) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1e7OFB-0004Bs-Sd for 28994@debbugs.gnu.org; Wed, 25 Oct 2017 12:09:26 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1e7OF2-0002BJ-DZ for 28994@debbugs.gnu.org; Wed, 25 Oct 2017 12:09:20 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,RP_MATCHES_RCVD autolearn=disabled version=3.3.2 Received: from fencepost.gnu.org ([2001:4830:134:3::e]:40849) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1e7OF2-0002B9-AB; Wed, 25 Oct 2017 12:09:16 -0400 Received: from [176.228.60.248] (port=1183 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1e7OF1-0004VT-Lt; Wed, 25 Oct 2017 12:09:16 -0400 Date: Wed, 25 Oct 2017 19:09:04 +0300 Message-Id: <83efpr8b1b.fsf@gnu.org> From: Eli Zaretskii In-reply-to: (message from Stefan Monnier on Wed, 25 Oct 2017 11:37:58 -0400) References: X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2001:4830:134:3::e X-Spam-Score: -5.0 (-----) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -5.0 (-----) > From: Stefan Monnier > Date: Wed, 25 Oct 2017 11:37:58 -0400 > > Any objection to installing this patch None if you meant to install on master. Thanks. From unknown Tue Aug 19 14:22:06 2025 X-Loop: help-debbugs@gnu.org Subject: bug#28994: 26.0.90; Build error during bootstrap Resent-From: Stefan Monnier Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 25 Oct 2017 16:18:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 28994 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Eli Zaretskii Cc: 28994@debbugs.gnu.org Received: via spool by 28994-submit@debbugs.gnu.org id=B28994.150894825416937 (code B ref 28994); Wed, 25 Oct 2017 16:18:01 +0000 Received: (at 28994) by debbugs.gnu.org; 25 Oct 2017 16:17:34 +0000 Received: from localhost ([127.0.0.1]:33540 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1e7ON4-0004P7-4F for submit@debbugs.gnu.org; Wed, 25 Oct 2017 12:17:34 -0400 Received: from pruche.dit.umontreal.ca ([132.204.246.22]:55200) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1e7ON1-0004Oy-P5 for 28994@debbugs.gnu.org; Wed, 25 Oct 2017 12:17:32 -0400 Received: from ceviche.home (lechon.iro.umontreal.ca [132.204.27.242]) by pruche.dit.umontreal.ca (8.14.7/8.14.1) with ESMTP id v9PGHT7D024984; Wed, 25 Oct 2017 12:17:30 -0400 Received: by ceviche.home (Postfix, from userid 20848) id 97C1566233; Wed, 25 Oct 2017 12:17:29 -0400 (EDT) From: Stefan Monnier Message-ID: References: <83efpr8b1b.fsf@gnu.org> Date: Wed, 25 Oct 2017 12:17:29 -0400 In-Reply-To: <83efpr8b1b.fsf@gnu.org> (Eli Zaretskii's message of "Wed, 25 Oct 2017 19:09:04 +0300") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-NAI-Spam-Flag: NO X-NAI-Spam-Level: X-NAI-Spam-Threshold: 5 X-NAI-Spam-Score: 0.1 X-NAI-Spam-Rules: 3 Rules triggered GEN_SPAM_FEATRE=0.1, EDT_SA_DN_PASS=0, RV6144=0 X-NAI-Spam-Version: 2.3.0.9418 : core <6144> : inlines <6144> : streams <1768389> : uri <2522258> X-Spam-Score: -1.3 (-) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.3 (-) >> Any objection to installing this patch > None if you meant to install on master. OK. And would there be some part you'd be willing/interested to see on emacs-26? Stefan From unknown Tue Aug 19 14:22:06 2025 X-Loop: help-debbugs@gnu.org Subject: bug#28994: 26.0.90; Build error during bootstrap Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 25 Oct 2017 16:27:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 28994 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Stefan Monnier Cc: 28994@debbugs.gnu.org Reply-To: Eli Zaretskii Received: via spool by 28994-submit@debbugs.gnu.org id=B28994.150894876417875 (code B ref 28994); Wed, 25 Oct 2017 16:27:02 +0000 Received: (at 28994) by debbugs.gnu.org; 25 Oct 2017 16:26:04 +0000 Received: from localhost ([127.0.0.1]:33568 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1e7OVI-0004eF-8f for submit@debbugs.gnu.org; Wed, 25 Oct 2017 12:26:04 -0400 Received: from eggs.gnu.org ([208.118.235.92]:33286) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1e7OVG-0004dh-4M for 28994@debbugs.gnu.org; Wed, 25 Oct 2017 12:26:02 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1e7OV7-0006Em-WD for 28994@debbugs.gnu.org; Wed, 25 Oct 2017 12:25:57 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,RP_MATCHES_RCVD autolearn=disabled version=3.3.2 Received: from fencepost.gnu.org ([2001:4830:134:3::e]:41300) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1e7OV7-0006Ef-Sa; Wed, 25 Oct 2017 12:25:53 -0400 Received: from [176.228.60.248] (port=1366 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1e7OV7-0005i2-9Q; Wed, 25 Oct 2017 12:25:53 -0400 Date: Wed, 25 Oct 2017 19:25:41 +0300 Message-Id: <83d15b8a9m.fsf@gnu.org> From: Eli Zaretskii In-reply-to: (message from Stefan Monnier on Wed, 25 Oct 2017 12:17:29 -0400) References: <83efpr8b1b.fsf@gnu.org> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2001:4830:134:3::e X-Spam-Score: -5.0 (-----) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -5.0 (-----) > From: Stefan Monnier > Cc: 28994@debbugs.gnu.org > Date: Wed, 25 Oct 2017 12:17:29 -0400 > > >> Any objection to installing this patch > > None if you meant to install on master. > > OK. And would there be some part you'd be willing/interested to see on > emacs-26? The Lisp parts look innocent enough. From unknown Tue Aug 19 14:22:06 2025 MIME-Version: 1.0 X-Mailer: MIME-tools 5.505 (Entity 5.505) X-Loop: help-debbugs@gnu.org From: help-debbugs@gnu.org (GNU bug Tracking System) To: Stefan Monnier Subject: bug#28994: closed (Re: bug#28994: 26.0.90; Build error during bootstrap) Message-ID: References: X-Gnu-PR-Message: they-closed 28994 X-Gnu-PR-Package: emacs Reply-To: 28994@debbugs.gnu.org Date: Wed, 25 Oct 2017 16:39:02 +0000 Content-Type: multipart/mixed; boundary="----------=_1508949542-19162-1" This is a multi-part message in MIME format... ------------=_1508949542-19162-1 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" Your bug report #28994: 26.0.90; Build error during bootstrap which was filed against the emacs package, has been closed. The explanation is attached below, along with your original report. If you require more details, please reply to 28994@debbugs.gnu.org. --=20 28994: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=3D28994 GNU Bug Tracking System Contact help-debbugs@gnu.org with problems ------------=_1508949542-19162-1 Content-Type: message/rfc822 Content-Disposition: inline Content-Transfer-Encoding: 7bit Received: (at 28994-done) by debbugs.gnu.org; 25 Oct 2017 16:38:33 +0000 Received: from localhost ([127.0.0.1]:33590 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1e7OhM-0004yJ-S7 for submit@debbugs.gnu.org; Wed, 25 Oct 2017 12:38:33 -0400 Received: from pruche.dit.umontreal.ca ([132.204.246.22]:57718) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1e7OhL-0004yB-6z for 28994-done@debbugs.gnu.org; Wed, 25 Oct 2017 12:38:31 -0400 Received: from ceviche.home (lechon.iro.umontreal.ca [132.204.27.242]) by pruche.dit.umontreal.ca (8.14.7/8.14.1) with ESMTP id v9PGcUlO027192; Wed, 25 Oct 2017 12:38:30 -0400 Received: by ceviche.home (Postfix, from userid 20848) id D29A966233; Wed, 25 Oct 2017 12:38:29 -0400 (EDT) From: Stefan Monnier To: Eli Zaretskii Subject: Re: bug#28994: 26.0.90; Build error during bootstrap Message-ID: References: <83efpr8b1b.fsf@gnu.org> <83d15b8a9m.fsf@gnu.org> Date: Wed, 25 Oct 2017 12:38:29 -0400 In-Reply-To: <83d15b8a9m.fsf@gnu.org> (Eli Zaretskii's message of "Wed, 25 Oct 2017 19:25:41 +0300") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-NAI-Spam-Flag: NO X-NAI-Spam-Threshold: 5 X-NAI-Spam-Score: 0 X-NAI-Spam-Rules: 2 Rules triggered EDT_SA_DN_PASS=0, RV6144=0 X-NAI-Spam-Version: 2.3.0.9418 : core <6144> : inlines <6144> : streams <1768391> : uri <2522264> X-Spam-Score: -1.3 (-) X-Debbugs-Envelope-To: 28994-done Cc: 28994-done@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.3 (-) >> >> Any objection to installing this patch >> > None if you meant to install on master. >> OK. And would there be some part you'd be willing/interested to see on >> emacs-26? > The Lisp parts look innocent enough. OK, done, thanks, Stefan ------------=_1508949542-19162-1 Content-Type: message/rfc822 Content-Disposition: inline Content-Transfer-Encoding: 7bit Received: (at submit) by debbugs.gnu.org; 25 Oct 2017 15:44:09 +0000 Received: from localhost ([127.0.0.1]:33510 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1e7Nqi-0003Vl-R5 for submit@debbugs.gnu.org; Wed, 25 Oct 2017 11:44:09 -0400 Received: from eggs.gnu.org ([208.118.235.92]:47773) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1e7Nqh-0003VW-5w for submit@debbugs.gnu.org; Wed, 25 Oct 2017 11:44:07 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1e7Nqa-0001fx-QH for submit@debbugs.gnu.org; Wed, 25 Oct 2017 11:44:02 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=0.8 required=5.0 tests=BAYES_50 autolearn=disabled version=3.3.2 Received: from lists.gnu.org ([2001:4830:134:3::11]:36217) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1e7Nqa-0001fl-Ms for submit@debbugs.gnu.org; Wed, 25 Oct 2017 11:44:00 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:38739) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1e7NqZ-0000TM-5s for bug-gnu-emacs@gnu.org; Wed, 25 Oct 2017 11:44:00 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1e7NqV-0001X2-RE for bug-gnu-emacs@gnu.org; Wed, 25 Oct 2017 11:43:59 -0400 Received: from chene.dit.umontreal.ca ([132.204.246.20]:47383) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1e7NqV-0001Uz-LP for bug-gnu-emacs@gnu.org; Wed, 25 Oct 2017 11:43:55 -0400 Received: from ceviche.home (lechon.iro.umontreal.ca [132.204.27.242]) by chene.dit.umontreal.ca (8.14.7/8.14.1) with ESMTP id v9PFhrog010983 for ; Wed, 25 Oct 2017 11:43:53 -0400 Received: by ceviche.home (Postfix, from userid 20848) id CCE0266233; Wed, 25 Oct 2017 11:37:58 -0400 (EDT) From: Stefan Monnier To: bug-gnu-emacs@gnu.org Subject: 26.0.90; Build error during bootstrap Date: Wed, 25 Oct 2017 11:37:58 -0400 Message-ID: MIME-Version: 1.0 Content-Type: text/plain X-NAI-Spam-Flag: NO X-NAI-Spam-Level: X-NAI-Spam-Threshold: 5 X-NAI-Spam-Score: 0.3 X-NAI-Spam-Rules: 5 Rules triggered BEC_TRC1=0.1, BEC_TRC1_W_GEN_SPAM_FEATRE=0.1, GEN_SPAM_FEATRE=0.1, EDT_SA_DN_PASS=0, RV6144=0 X-NAI-Spam-Version: 2.3.0.9418 : core <6144> : inlines <6144> : streams <1768387> : uri <2522246> X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x X-Received-From: 2001:4830:134:3::11 X-Spam-Score: -4.0 (----) X-Debbugs-Envelope-To: submit X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -4.0 (----) Package: Emacs Version: 26.0.90 The following: rm -f src/bootstrap-emacs lisp/progmodes/elisp-mode.elc make triggers the following message: [...] Loading emacs-lisp/lisp-mode... Loading .../lisp/progmodes/elisp-mode.el (source)... Eager macro-expansion failure: (error "Autoloading file .../lisp/emacs-lisp/regexp-opt.elc failed to define function flymake-log") Loading textmodes/text-mode... [...] It's arguably harmless, but the error is undesirable and the error message itself clearly shows we have a bug somewhere in our error reporting. I tracked down the source of the problem to: - autoload-do-load (called to fetch flymake-log) will call `load` telling it to silently ignore errors if flymake is not found. - then, indeed, flymake.el isn't found (because lisp/progmodes is not in load-path in this specific situation). - so after the call to `load` the macro is still not defined and the load-history has no trace of flymake.el since we didn't load it at all, hence the odd error message. The patch below to src/eval.c fixes this problem by: - not signaling an error if the load didn't define the function when we told load not to signal an error anyway (so we don't emit a misleading message about some unrelated file). - not telling load to ignore errors when we're trying to load a macro. So after that patch, we get the real error message: [...] Loading emacs-lisp/lisp-mode... Loading .../lisp/progmodes/elisp-mode.el (source)... Eager macro-expansion failure: (file-missing "Cannot open load file" "Aucun fichier ou dossier de ce type" "flymake") Loading textmodes/text-mode... [...] Which I fix with the patch to lisp/loadup.el. This then bumps into another error, because flymake.el ends up loading edmacro, which loads kmacro which tries to modify query-replace-map which doesn't exist yet, and if we fix that by loading `replace.el` we get yet another error because `replace.el` tries to use text-mode-map which again isn't defined yet, which I fix by loading text-mode. And now it works without signaling an error. Any objection to installing this patch, or suggestion to fix the string of problems some other way? Stefan diff --git a/lisp/kmacro.el b/lisp/kmacro.el index 4abc571db4..5729f2fc8d 100644 --- a/lisp/kmacro.el +++ b/lisp/kmacro.el @@ -111,6 +111,7 @@ ;;; Code: ;; Customization: +(require 'replace) (defgroup kmacro nil "Simplified keyboard macro user interface." diff --git a/lisp/loadup.el b/lisp/loadup.el index d048f0736b..40e5651aa1 100644 --- a/lisp/loadup.el +++ b/lisp/loadup.el @@ -76,6 +76,7 @@ (setq max-lisp-eval-depth 2200) (setq load-path (list (expand-file-name "." dir) (expand-file-name "emacs-lisp" dir) + (expand-file-name "progmodes" dir) (expand-file-name "language" dir) (expand-file-name "international" dir) (expand-file-name "textmodes" dir) diff --git a/lisp/replace.el b/lisp/replace.el index a5548f461d..cdaeb9240a 100644 --- a/lisp/replace.el +++ b/lisp/replace.el @@ -28,6 +28,7 @@ ;;; Code: +(require 'text-mode) (eval-when-compile (require 'cl-lib)) (defcustom case-replace t diff --git a/src/eval.c b/src/eval.c index 52e4c96d4b..063deb4ba0 100644 --- a/src/eval.c +++ b/src/eval.c @@ -1986,12 +1986,10 @@ it defines a macro. */) if (!CONSP (fundef) || !EQ (Qautoload, XCAR (fundef))) return fundef; - if (EQ (macro_only, Qmacro)) - { - Lisp_Object kind = Fnth (make_number (4), fundef); - if (! (EQ (kind, Qt) || EQ (kind, Qmacro))) - return fundef; - } + Lisp_Object kind = Fnth (make_number (4), fundef); + if (EQ (macro_only, Qmacro) + && !(EQ (kind, Qt) || EQ (kind, Qmacro))) + return fundef; /* This is to make sure that loadup.el gives a clear picture of what files are preloaded and when. */ @@ -2014,15 +2012,18 @@ it defines a macro. */) The value saved here is to be restored into Vautoload_queue. */ record_unwind_protect (un_autoload, Vautoload_queue); Vautoload_queue = Qt; - /* If `macro_only', assume this autoload to be a "best-effort", + /* If `macro_only' is set and fundef isn't a macro, assume this autoload to + be a "best-effort" (e.g. to try and find a compiler macro), so don't signal an error if autoloading fails. */ - Fload (Fcar (Fcdr (fundef)), macro_only, Qt, Qnil, Qt); + Lisp_Object ignore_errors + = (EQ (kind, Qt) || EQ (kind, Qmacro)) ? Qnil : macro_only; + Fload (Fcar (Fcdr (fundef)), ignore_errors, Qt, Qnil, Qt); /* Once loading finishes, don't undo it. */ Vautoload_queue = Qt; unbind_to (count, Qnil); - if (NILP (funname)) + if (NILP (funname) || !NILP (ignore_errors)) return Qnil; else { ------------=_1508949542-19162-1-- From unknown Tue Aug 19 14:22:06 2025 X-Loop: help-debbugs@gnu.org Subject: bug#28994: 26.0.90; Build error during bootstrap Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 25 Oct 2017 17:35:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 28994 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Stefan Monnier Cc: 28994@debbugs.gnu.org Reply-To: Eli Zaretskii Received: via spool by 28994-submit@debbugs.gnu.org id=B28994.150895286532021 (code B ref 28994); Wed, 25 Oct 2017 17:35:01 +0000 Received: (at 28994) by debbugs.gnu.org; 25 Oct 2017 17:34:25 +0000 Received: from localhost ([127.0.0.1]:33625 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1e7PZQ-0008KO-MU for submit@debbugs.gnu.org; Wed, 25 Oct 2017 13:34:25 -0400 Received: from eggs.gnu.org ([208.118.235.92]:47442) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1e7PZO-0008K5-MQ for 28994@debbugs.gnu.org; Wed, 25 Oct 2017 13:34:22 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1e7PZF-0007vD-HO for 28994@debbugs.gnu.org; Wed, 25 Oct 2017 13:34:17 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,RP_MATCHES_RCVD autolearn=disabled version=3.3.2 Received: from fencepost.gnu.org ([2001:4830:134:3::e]:42123) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1e7PZF-0007v6-EN; Wed, 25 Oct 2017 13:34:13 -0400 Received: from [176.228.60.248] (port=1594 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1e7PZD-0007MV-Jw; Wed, 25 Oct 2017 13:34:13 -0400 Date: Wed, 25 Oct 2017 20:33:54 +0300 Message-Id: <83a80f873x.fsf@gnu.org> From: Eli Zaretskii In-reply-to: (message from Stefan Monnier on Wed, 25 Oct 2017 12:38:29 -0400) References: <83efpr8b1b.fsf@gnu.org> <83d15b8a9m.fsf@gnu.org> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2001:4830:134:3::e X-Spam-Score: -5.0 (-----) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -5.0 (-----) > From: Stefan Monnier > Cc: 28994-done@debbugs.gnu.org > Date: Wed, 25 Oct 2017 12:38:29 -0400 > > >> >> Any objection to installing this patch > >> > None if you meant to install on master. > >> OK. And would there be some part you'd be willing/interested to see on > >> emacs-26? > > The Lisp parts look innocent enough. > > OK, done, thanks, Thank you.