From 20b8ac5723661de8920c0090fe91368d3229723c Mon Sep 17 00:00:00 2001 From: Lars Ingebrigtsen Date: Mon, 15 Aug 2022 09:27:13 +0200 Subject: [PATCH] Make eshell-mode more resilient towards `mode-line-format' * lisp/eshell/esh-mode.el (eshell-mode): `mode-line-format' can be a string (bug#57185). In that case, don't alter anything. --- lisp/eshell/esh-mode.el | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lisp/eshell/esh-mode.el b/lisp/eshell/esh-mode.el index 972d4f9df00..ecbcf88b973 100644 --- a/lisp/eshell/esh-mode.el +++ b/lisp/eshell/esh-mode.el @@ -301,7 +301,8 @@ and the hook `eshell-exit-hook'." "Emacs shell interactive mode." (setq-local eshell-mode t) - (when eshell-status-in-mode-line + (when (and eshell-status-in-mode-line + (listp mode-line-format)) (make-local-variable 'eshell-command-running-string) (let ((fmt (copy-sequence mode-line-format))) (setq-local mode-line-format fmt)) -- 2.39.2