From 6bcd6713217657ab85173824dafb6a85f36cb45b Mon Sep 17 00:00:00 2001 From: JSDurand Date: Wed, 2 Jun 2021 16:00:19 +0800 Subject: modeline: Reduce upper bound for the minor modes. * modeline.el (modeline-minor-modes-name-len-max): Now set to 20. For a long mode line, some compromises are unavoidable. Among the elements of a mode line, I think the information about minor modes should be compromised first. (modeline-format-minor-modes): Reformat. --- modeline.el | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/modeline.el b/modeline.el index 49ad135..2a0ca37 100644 --- a/modeline.el +++ b/modeline.el @@ -308,7 +308,7 @@ MAP is the local keymap of the text." mode-line-column-line-number-mode-map)) ;;;###autoload -(defvar modeline-minor-modes-name-len-max 150 +(defvar modeline-minor-modes-name-len-max 20 "The maximal length for the display of minor modes in the mode line.") ;;;###autoload @@ -324,7 +324,8 @@ MAP is the local keymap of the text." ('mode-line-inactive)))) (orig (cond ((and (not (string= raw "")) - (= (aref raw 0) 32)) (substring raw 1)) + (= (aref raw 0) 32)) + (substring raw 1)) (raw)))) (cond ((<= (length orig) modeline-minor-modes-name-len-max) -- cgit v1.2.3-18-g5258