From 0bfe3ab2b6d6310c48e16bbbfdd5cc89e1dae763 Mon Sep 17 00:00:00 2001 From: Jessie Hildebrandt Date: Fri, 10 May 2019 20:35:11 -0400 Subject: [PATCH] Add new global-mode-string segment --- mood-line.el | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/mood-line.el b/mood-line.el index f0ee391..f435b99 100644 --- a/mood-line.el +++ b/mood-line.el @@ -249,6 +249,12 @@ 'bold 'mood-line-status-grayed-out))) +(defun mood-line-segment-global-mode-string () + "Displays the current value of `global-mode-string' in the mode-line." + (when (not (string= (mapconcat 'concat (mapcar 'eval global-mode-string) "") "")) + (propertize "%M " + 'face 'mood-line-status-grayed-out))) + (defun mood-line-segment-flycheck () "Displays color-coded flycheck information in the mode-line (if available)." mood-line--flycheck-text) @@ -300,6 +306,7 @@ (format-mode-line '((:eval (mood-line-segment-vc)) (:eval (mood-line-segment-major-mode)) + (:eval (mood-line-segment-global-mode-string)) (:eval (mood-line-segment-flycheck)) " "))))))) (progn