GNU bug report logs -
#39705
28.0.50; mode-line-process in comint-redirect-setup
Previous Next
Reported by: Juri Linkov <juri <at> linkov.net>
Date: Fri, 21 Feb 2020 00:11:02 UTC
Severity: normal
Tags: fixed, patch
Fixed in version 28.0.50
Done: Juri Linkov <juri <at> linkov.net>
Bug is archived. No further changes may be made.
Full log
View this message in rfc822 format
Tags: patch
I customized mode-line-process to highlight its status with a color
(add-hook 'comint-mode-hook
(lambda ()
(require 'compile)
(setq mode-line-process
'(:propertize ":%s" face compilation-mode-line-fail))))
as was recommended in http://thread.gmane.org/gmane.emacs.devel/153647/focus=153682
But comint.el signals an error because it expects mode-line-process to be
in its default value. I don't know how to make mode-line customization
to be less brittle, but at least this case can be fixed by:
diff --git a/lisp/comint.el b/lisp/comint.el
index 5c521ff0fd..ea06f8af87 100644
--- a/lisp/comint.el
+++ b/lisp/comint.el
@@ -3641,7 +3641,7 @@ comint-redirect-setup
(setq-local comint-redirect-previous-input-string "")
(setq mode-line-process
- (if mode-line-process
+ (if (and mode-line-process (stringp (elt mode-line-process 0)))
(list (concat (elt mode-line-process 0) " Redirection"))
(list ":%s Redirection")))))
This bug report was last modified 5 years and 172 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.