From: Eli Zaretskii <eliz@gnu.org>
To: Leo Liu <sdl.web@gmail.com>
Cc: 45708@debbugs.gnu.org
Subject: bug#45708: 27.1; (setq inhibit-default-init t) not working
Date: Thu, 07 Jan 2021 16:00:14 +0200 [thread overview]
Message-ID: <83zh1kludt.fsf@gnu.org> (raw)
In-Reply-To: <m17dopwbs1.fsf@gmail.com> (message from Leo Liu on Thu, 07 Jan 2021 13:34:22 +0800)
> From: Leo Liu <sdl.web@gmail.com>
> 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)
next prev parent reply other threads:[~2021-01-07 14:00 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-01-07 5:34 bug#45708: 27.1; (setq inhibit-default-init t) not working Leo Liu
2021-01-07 14:00 ` Eli Zaretskii [this message]
2021-01-08 4:22 ` Leo Liu
2021-01-08 7:36 ` Eli Zaretskii
2021-01-08 11:56 ` Leo Liu
2021-01-08 12:35 ` Eli Zaretskii
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=83zh1kludt.fsf@gnu.org \
--to=eliz@gnu.org \
--cc=45708@debbugs.gnu.org \
--cc=sdl.web@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).