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)
This commit is contained in:
parent
5d76288660
commit
74d18957b8
1 changed files with 5 additions and 4 deletions
|
@ -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
|
loaded, and ALTERNATE-FILENAME-FUNCTION is non-nil, then it is
|
||||||
called with no arguments and should return the name of an
|
called with no arguments and should return the name of an
|
||||||
alternate init-file to load. If LOAD-DEFAULTS is non-nil, then
|
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
|
This function sets `user-init-file' to the name of the loaded
|
||||||
init-file, or to a default value if loading is not possible."
|
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))
|
(sit-for 1))
|
||||||
(setq user-init-file source))))
|
(setq user-init-file source))))
|
||||||
|
|
||||||
(when load-defaults
|
(when (and load-defaults
|
||||||
|
(not inhibit-default-init))
|
||||||
;; Prevent default.el from changing the value of
|
;; Prevent default.el from changing the value of
|
||||||
;; `inhibit-startup-screen'.
|
;; `inhibit-startup-screen'.
|
||||||
(let ((inhibit-startup-screen nil))
|
(let ((inhibit-startup-screen nil))
|
||||||
|
@ -1390,7 +1391,7 @@ please check its value")
|
||||||
(expand-file-name
|
(expand-file-name
|
||||||
"init"
|
"init"
|
||||||
startup-init-directory))
|
startup-init-directory))
|
||||||
(not inhibit-default-init))
|
t)
|
||||||
|
|
||||||
(when (and deactivate-mark transient-mark-mode)
|
(when (and deactivate-mark transient-mark-mode)
|
||||||
(with-current-buffer (window-buffer)
|
(with-current-buffer (window-buffer)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue