From e41b7cc9353c63552219ff520da0adfef39157f2 Mon Sep 17 00:00:00 2001 From: Lars Ingebrigtsen Date: Fri, 6 May 2022 14:04:55 +0200 Subject: [PATCH] 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 57a38a295ed..0b7d90ecf2b 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 -- 2.39.2