]> git.eshelyaron.com Git - emacs.git/commitdiff
Avoid warning about 'load-path' in non-interactive sessions
authorEli Zaretskii <eliz@gnu.org>
Sun, 12 Feb 2023 12:20:48 +0000 (14:20 +0200)
committerEli Zaretskii <eliz@gnu.org>
Sun, 12 Feb 2023 12:20:48 +0000 (14:20 +0200)
* lisp/startup.el (command-line): Emit the warning about
'user-emacs-directory' in 'load-path' only in interactive
sessions.  (Bug#61014)

lisp/startup.el

index bb6250d3968a86733b4548111b3f676fd4e377bd..e5ec15eebeae433a11a766b81d4adf4daa4d481a 100644 (file)
@@ -1596,7 +1596,8 @@ please check its value")
   ;; or EMACSLOADPATH, so we basically always have to check.
   (let (warned)
     (dolist (dir load-path)
-      (and (not warned)
+      (and (not noninteractive)
+           (not warned)
           (stringp dir)
           (string-equal (file-name-as-directory (expand-file-name dir))
                         (expand-file-name user-emacs-directory))