]> git.eshelyaron.com Git - emacs.git/commitdiff
Fix inhibiting reading the user init file with "emacs -x"
authorLars Ingebrigtsen <larsi@gnus.org>
Fri, 6 May 2022 12:04:55 +0000 (14:04 +0200)
committerLars Ingebrigtsen <larsi@gnus.org>
Fri, 6 May 2022 12:04:55 +0000 (14:04 +0200)
* lisp/startup.el (command-line): Really inhibit loading the user
init file with "emacs -x".

lisp/startup.el

index 57a38a295edd54013d822628bf32f30d9c45ed48..0b7d90ecf2beb1660034a35a67e52dbc34dfce9a 100644 (file)
@@ -1236,6 +1236,14 @@ please check its value")
                  (t
                   (setq argval nil
                         argi orig-argi)))))
+
+        ;; We handle "-scripteval" further down, but we have to
+        ;; inhibit loading the user init file first.  (This is for
+        ;; "emacs -x" handling.)
+       (when (equal argi "-scripteval")
+         (setq init-file-user nil
+                noninteractive t))
+
        (cond
         ;; The --display arg is handled partly in C, partly in Lisp.
         ;; When it shows up here, we just put it back to be handled