From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.bugs Subject: bug#45708: 27.1; (setq inhibit-default-init t) not working Date: Thu, 07 Jan 2021 16:00:14 +0200 Message-ID: <83zh1kludt.fsf@gnu.org> References: Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="4569"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 45708@debbugs.gnu.org To: Leo Liu Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Thu Jan 07 15:11:46 2021 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1kxW0w-00015P-0m for geb-bug-gnu-emacs@m.gmane-mx.org; Thu, 07 Jan 2021 15:11:46 +0100 Original-Received: from localhost ([::1]:43116 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kxW0v-0004K0-0E for geb-bug-gnu-emacs@m.gmane-mx.org; Thu, 07 Jan 2021 09:11:45 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:42908) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kxVqZ-0003zk-5U for bug-gnu-emacs@gnu.org; Thu, 07 Jan 2021 09:01:03 -0500 Original-Received: from debbugs.gnu.org ([209.51.188.43]:35328) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1kxVqY-00071W-Bb for bug-gnu-emacs@gnu.org; Thu, 07 Jan 2021 09:01:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1kxVqY-0005Sc-AW for bug-gnu-emacs@gnu.org; Thu, 07 Jan 2021 09:01:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 07 Jan 2021 14:01:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 45708 X-GNU-PR-Package: emacs Original-Received: via spool by 45708-submit@debbugs.gnu.org id=B45708.161002802520938 (code B ref 45708); Thu, 07 Jan 2021 14:01:02 +0000 Original-Received: (at 45708) by debbugs.gnu.org; 7 Jan 2021 14:00:25 +0000 Original-Received: from localhost ([127.0.0.1]:46874 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kxVpx-0005Rc-5K for submit@debbugs.gnu.org; Thu, 07 Jan 2021 09:00:25 -0500 Original-Received: from eggs.gnu.org ([209.51.188.92]:49388) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kxVpr-0005RH-Ml for 45708@debbugs.gnu.org; Thu, 07 Jan 2021 09:00:23 -0500 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]:55928) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kxVpm-0006Wf-CT; Thu, 07 Jan 2021 09:00:14 -0500 Original-Received: from 84.94.185.95.cable.012.net.il ([84.94.185.95]:1860 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1kxVpl-0001Rh-6P; Thu, 07 Jan 2021 09:00:13 -0500 In-Reply-To: (message from Leo Liu on Thu, 07 Jan 2021 13:34:22 +0800) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.io gmane.emacs.bugs:197481 Archived-At: > From: Leo Liu > Date: Thu, 07 Jan 2021 13:34:22 +0800 > > I tried to move to 27.1 in Oct 2020 but my setup was badly broken. > > So I tried again today and I discovered the culprit seemed to be that > default.el is loaded regardless of (setq inhibit-default-init t) in my > emacs init file. > > My emacs setup has been working flawlessly since at least Emacs 24. > > This incompatibility seems unintentional because the elisp documentation > specifically allows setting inhibit-default-init in user init file. Yes, this is an unintended consequence of refactoring some of the startup code to support the early-init file. Does the patch below fix the problem? diff --git a/lisp/startup.el b/lisp/startup.el index cdf4eea..b60c13e 100644 --- a/lisp/startup.el +++ b/lisp/startup.el @@ -927,7 +927,8 @@ startup--load-user-init-file loaded, and ALTERNATE-FILENAME-FUNCTION is non-nil, then it is called with no arguments and should return the name of an alternate init-file to load. If LOAD-DEFAULTS is non-nil, then -load default.el after the init-file. +load default.el after the init-file, unless `inhibit-default-init' +is non-nil. This function sets `user-init-file' to the name of the loaded init-file, or to a default value if loading is not possible." @@ -983,8 +984,8 @@ startup--load-user-init-file (sit-for 1)) (setq user-init-file source)))) - (when load-defaults - + (when (and load-defaults + (not inhibit-default-init)) ;; Prevent default.el from changing the value of ;; `inhibit-startup-screen'. (let ((inhibit-startup-screen nil)) @@ -1390,7 +1391,7 @@ command-line (expand-file-name "init" startup-init-directory)) - (not inhibit-default-init)) + t) (when (and deactivate-mark transient-mark-mode) (with-current-buffer (window-buffer)