aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEli Zaretskii2022-04-22 15:18:56 +0300
committerEli Zaretskii2022-04-22 15:18:56 +0300
commitf2f9e8dc76cdc7433624ee7e88ec5380a5b06902 (patch)
tree70154f46adf3d2f10381d898062d872924fd7a1c
parent05705454d5c616cb54294ae3bbb2d40ab72fc8ed (diff)
downloademacs-f2f9e8dc76cdc7433624ee7e88ec5380a5b06902.tar.gz
emacs-f2f9e8dc76cdc7433624ee7e88ec5380a5b06902.zip
; Improve comments for a recently installed bugfix
* lisp/startup.el (command-line): Remove references to a wrong bug number and improve comments for delaying the 'user-emacs-directory' warning. (Bug#25163)
-rw-r--r--lisp/startup.el17
1 files changed, 11 insertions, 6 deletions
diff --git a/lisp/startup.el b/lisp/startup.el
index 4391fdd9961..57a38a295ed 100644
--- a/lisp/startup.el
+++ b/lisp/startup.el
@@ -1291,9 +1291,11 @@ please check its value")
1291 (setcdr command-line-args args))) 1291 (setcdr command-line-args args)))
1292 1292
1293 ;; Re-evaluate predefined variables whose initial value depends on 1293 ;; Re-evaluate predefined variables whose initial value depends on
1294 ;; the runtime context. 1294 ;; the runtime context. But delay the warning about
1295 (let ((user-emacs-directory-warning nil)) ; Delay showing this 1295 ;; `user-emacs-directory' being inaccessible until after processing
1296 ; warning (Bug#25162). 1296 ;; the init file and the command-line arguments, in case the user
1297 ;; customized `user-emacs-directory-warning' to nil via those.
1298 (let ((user-emacs-directory-warning nil))
1297 (when (listp custom-delayed-init-variables) 1299 (when (listp custom-delayed-init-variables)
1298 (mapc #'custom-reevaluate-setting 1300 (mapc #'custom-reevaluate-setting
1299 ;; Initialize them in the same order they were loaded, in 1301 ;; Initialize them in the same order they were loaded, in
@@ -1559,14 +1561,17 @@ please check its value")
1559 (list 'error 1561 (list 'error
1560 (substitute-command-keys "Memory exhausted--use \\[save-some-buffers] then exit and restart Emacs"))) 1562 (substitute-command-keys "Memory exhausted--use \\[save-some-buffers] then exit and restart Emacs")))
1561 1563
1562 ;; Reevaluate `user-emacs-directory-warning' before process '--eval' 1564 ;; Reevaluate `user-emacs-directory-warning' before processing
1563 ;; args, so that the user can override that default (Bug#25162). 1565 ;; '--eval' arguments, so that the user could override the default
1566 ;; value in the '--eval' forms.
1564 (custom-reevaluate-setting 'user-emacs-directory-warning) 1567 (custom-reevaluate-setting 'user-emacs-directory-warning)
1565 1568
1566 ;; Process the remaining args. 1569 ;; Process the remaining args.
1567 (command-line-1 (cdr command-line-args)) 1570 (command-line-1 (cdr command-line-args))
1568 1571
1569 ;; Check if `user-emacs-directory' is accessible (Bug#25162). 1572 ;; Check if `user-emacs-directory' is accessible and warn if it
1573 ;; isn't, unless `user-emacs-directory-warning' was customized to
1574 ;; disable that warning.
1570 (when (and user-emacs-directory-warning 1575 (when (and user-emacs-directory-warning
1571 (not (file-accessible-directory-p user-emacs-directory))) 1576 (not (file-accessible-directory-p user-emacs-directory)))
1572 (locate-user-emacs-file "")) 1577 (locate-user-emacs-file ""))