* lisp/startup.el (command-line): Emit the warning about
'user-emacs-directory' in 'load-path' only in interactive
sessions. (Bug#61014)
;; 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))