diff options
-rw-r--r-- | modeline.el | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/modeline.el b/modeline.el index ee2c0fd..3f98d77 100644 --- a/modeline.el +++ b/modeline.el @@ -90,6 +90,35 @@ (format-mode-line global-mode-string face))))) ;;;###autoload +(defun modeline-format-gnus () + "The mode line format for GNUS." + (let* ((left (modeline-gnus-format-left)) + (right (string-trim-right (modeline-format-right))) + (left-len (string-pixel-width left)) + (right-len (string-pixel-width right)) + (middle (propertize + (string 32) + 'display + (list + 'space + :width + (list + (- (window-pixel-width) left-len right-len + (- modeline-right-offset))))))) + (concat left middle right))) + +(defun modeline-gnus-format-left () + "The left part of the mode line for GNUS." + (declare (side-effect-free t) (pure t)) + (concat + (modeline-spc) + (modeline-format-buffer-name) + (modeline-spc) + (modeline-format-keycast) + (modeline-spc) + (modeline-format-minor-modes))) + +;;;###autoload (defun modeline-format-left () "The left mode line format." (concat |