unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
* bug#39705: 28.0.50; mode-line-process in comint-redirect-setup
@ 2020-02-20 23:45 Juri Linkov
  0 siblings, 0 replies; only message in thread
From: Juri Linkov @ 2020-02-20 23:45 UTC (permalink / raw)
  To: 39705

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")))))
 





^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2020-02-20 23:45 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-02-20 23:45 bug#39705: 28.0.50; mode-line-process in comint-redirect-setup Juri Linkov

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).