]> git.eshelyaron.com Git - emacs.git/commitdiff
Make eshell-mode more resilient towards `mode-line-format'
authorLars Ingebrigtsen <larsi@gnus.org>
Mon, 15 Aug 2022 07:27:13 +0000 (09:27 +0200)
committerLars Ingebrigtsen <larsi@gnus.org>
Mon, 15 Aug 2022 07:27:13 +0000 (09:27 +0200)
* 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

index 972d4f9df000e6afcf3342d786b8c8e3594da6a7..ecbcf88b973750d2584185c83a80433929eaba97 100644 (file)
@@ -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))