summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJSDurand <mmemmew@gmail.com>2021-06-02 16:00:19 +0800
committerJSDurand <mmemmew@gmail.com>2021-06-02 16:00:19 +0800
commit6bcd6713217657ab85173824dafb6a85f36cb45b (patch)
treed8ebbb12dc97a2c07f1f0852fbc43bd9abb3bec1
parent402d21a5879c8d5eeb4fb25c3ddeb7eeb08dc371 (diff)
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.
-rw-r--r--modeline.el5
1 files 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)