From 027e2f57af984478ef2cc09bf09628b1f65dc5dc Mon Sep 17 00:00:00 2001 From: Siyuan Chen Date: Tue, 1 Apr 2025 21:06:01 +0800 Subject: [PATCH] Remember the original shell-file-name, so we can use it when we recompile. --- lisp/progmodes/compile.el | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lisp/progmodes/compile.el b/lisp/progmodes/compile.el index 1ca58b3ac7d..13f20311a83 100644 --- a/lisp/progmodes/compile.el +++ b/lisp/progmodes/compile.el @@ -1973,6 +1973,7 @@ Returns the compilation buffer created." (replace-regexp-in-string "-mode\\'" "" (symbol-name mode)))) (thisdir default-directory) (thisenv compilation-environment) + (thishell shell-file-name) (buffer-path (and (local-variable-p 'exec-path) exec-path)) (buffer-env (and (local-variable-p 'process-environment) process-environment)) @@ -2048,6 +2049,7 @@ Returns the compilation buffer created." ;; NB: must be done after (funcall mode) as that resets local variables (setq-local compilation-directory thisdir) (setq-local compilation-environment thisenv) + (setq-local shell-file-name thishell) (if buffer-path (setq-local exec-path buffer-path) (kill-local-variable 'exec-path)) -- 2.32.0.windows.2