diff options
author | Lars Ingebrigtsen <larsi@gnus.org> | 2022-08-15 09:27:13 +0200 |
---|---|---|
committer | Lars Ingebrigtsen <larsi@gnus.org> | 2022-08-15 09:27:13 +0200 |
commit | 20b8ac5723661de8920c0090fe91368d3229723c (patch) | |
tree | f66331380accd794d0f279c75c9833c09184827e | |
parent | 79c0e78460b86d6efef31f65dcb16ab6b89b8551 (diff) | |
download | emacs-20b8ac5723661de8920c0090fe91368d3229723c.tar.gz |
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.
-rw-r--r-- | lisp/eshell/esh-mode.el | 3 |
1 files changed, 2 insertions, 1 deletions
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)) |