emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

master e41b7cc935: Fix inhibiting reading the user init file with "emacs


From: Lars Ingebrigtsen
Subject: master e41b7cc935: Fix inhibiting reading the user init file with "emacs -x"
Date: Fri, 6 May 2022 08:05:11 -0400 (EDT)

branch: master
commit e41b7cc9353c63552219ff520da0adfef39157f2
Author: Lars Ingebrigtsen <larsi@gnus.org>
Commit: Lars Ingebrigtsen <larsi@gnus.org>

    Fix inhibiting reading the user init file with "emacs -x"
    
    * lisp/startup.el (command-line): Really inhibit loading the user
    init file with "emacs -x".
---
 lisp/startup.el | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/lisp/startup.el b/lisp/startup.el
index 57a38a295e..0b7d90ecf2 100644
--- a/lisp/startup.el
+++ b/lisp/startup.el
@@ -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



reply via email to

[Prev in Thread] Current Thread [Next in Thread]