emacs-diffs
[Top][All Lists]
Advanced

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

master 20b8ac5723: Make eshell-mode more resilient towards `mode-line-fo


From: Lars Ingebrigtsen
Subject: master 20b8ac5723: Make eshell-mode more resilient towards `mode-line-format'
Date: Mon, 15 Aug 2022 03:27:26 -0400 (EDT)

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

    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 972d4f9df0..ecbcf88b97 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))



reply via email to

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