Add new global-mode-string segment

This commit is contained in:
Jessie Hildebrandt 2019-05-10 20:35:11 -04:00
parent b68f003b47
commit 0bfe3ab2b6

View File

@ -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