diff --git a/mood-line.el b/mood-line.el index a4cdbfe..93a4cae 100644 --- a/mood-line.el +++ b/mood-line.el @@ -348,10 +348,10 @@ The `Face' may be either a face symbol or a property list of key-value pairs mood-line-meow-state-alist))) (concat (propertize (car mode-cons) 'face (cdr mode-cons)) " ")))) -(defun mood-line--modal-editing-p () - "Determine if modal editing is being used." - (or (bound-and-true-p evil-mode) - (bound-and-true-p meow-mode))) +(defun mood-line-segment-modal () + "Call the correct mode-line segment when the first modal-mode is found." + (cond ((bound-and-true-p evil-mode) (mood-line-segment-evil)) + ((bound-and-true-p meow-mode) (mood-line-segment-meow)))) ;; ;; Activation function @@ -393,15 +393,9 @@ The `Face' may be either a face symbol or a property list of key-value pairs ;; Left (format-mode-line '(" " - (:eval (if (mood-line--modal-editing-p) - (progn - (mood-line-segment-evil) - (mood-line-segment-meow)) - (mood-line-segment-modified))) + (:eval (mood-line-segment-modal)) + (:eval (mood-line-segment-modified)) (:eval (mood-line-segment-buffer-name)) - (:eval (if (mood-line--modal-editing-p) - (concat - (mood-line-segment-modified) " "))) (:eval (mood-line-segment-anzu)) (:eval (mood-line-segment-multiple-cursors)) (:eval (mood-line-segment-position))))