emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

emacs-27 74d1895: Fix inhibiting the default.el loading in user init fil


From: Eli Zaretskii
Subject: emacs-27 74d1895: Fix inhibiting the default.el loading in user init file
Date: Fri, 8 Jan 2021 02:36:28 -0500 (EST)

branch: emacs-27
commit 74d18957b898e687dcc07ba86559367c8d8ba482
Author: Eli Zaretskii <eliz@gnu.org>
Commit: Eli Zaretskii <eliz@gnu.org>

    Fix inhibiting the default.el loading in user init file
    
    * lisp/startup.el (startup--load-user-init-file): Test the value
    of 'inhibit-default-init', not just the LOAD-DEFAULTS argument,
    because loading the user's init file could have set the value of
    the former.
    (command-line): Call 'startup--load-user-init-file' with last arg
    t: there's no longer any need to test the value of
    'inhibit-default-init' here, as it will be tested by the called
    function.  (Bug#45708)
---
 lisp/startup.el | 9 +++++----
 1 file changed, 5 insertions(+), 4 deletions(-)

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 @@ the name of the init-file to load.  If this file cannot be
 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 @@ init-file, or to a default value if loading is not 
possible."
                     (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 @@ please check its value")
        (expand-file-name
         "init"
         startup-init-directory))
-     (not inhibit-default-init))
+     t)
 
     (when (and deactivate-mark transient-mark-mode)
       (with-current-buffer (window-buffer)



reply via email to

[Prev in Thread] Current Thread [Next in Thread]