]> git.eshelyaron.com Git - emacs.git/commitdiff
Diagnose load-path only if interactive
authorPaul Eggert <eggert@cs.ucla.edu>
Thu, 24 Jul 2025 22:02:49 +0000 (15:02 -0700)
committerEshel Yaron <me@eshelyaron.com>
Sat, 26 Jul 2025 13:43:59 +0000 (15:43 +0200)
* lisp/startup.el (command-line): Warn about dubious
user-emacs-directory and load-path only if interactive, as that’s
where warning helps and the warnings just complicate batch usage
(e.g., -Q).

(cherry picked from commit b01b521717bed33323142aa791a22d46b8af11ad)

lisp/startup.el

index 2568f0e8ba2c3bcf8f42c130338d158722ff5940..05f40cfe62d3fc29ddd064f8b7786afa4f613d7b 100644 (file)
@@ -1569,6 +1569,9 @@ please check its value")
     ;; Process the remaining args.
     (command-line-1 (cdr command-line-args))
 
+    ;; If -batch, terminate after processing the command options.
+    (if noninteractive (kill-emacs t))
+
     ;; Check if `user-emacs-directory' is accessible and warn if it
     ;; isn't, unless `user-emacs-directory-warning' was customized to
     ;; disable that warning.
@@ -1602,9 +1605,6 @@ Consider using a subdirectory instead, e.g.: %s"
                                                    "lisp" user-emacs-directory))
                               :warning))))
 
-    ;; If -batch, terminate after processing the command options.
-    (if noninteractive (kill-emacs t))
-
     ;; In daemon mode, start the server to allow clients to connect.
     ;; This is done after loading the user's init file and after
     ;; processing all command line arguments to allow e.g. `server-name'