minmo : all calls in mode-line-format should be a func

This commit is contained in:
bth 2026-05-27 12:04:41 -07:00
commit 527642af44

View file

@ -149,6 +149,12 @@ Uses the fast `vc-state' cache rather than synchronous git calls."
(t (minmo--status 'unmodified 'disk))
))
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;; buffer-name
(defun minmo-buffer-name ()
(propertize (buffer-name) 'face 'font-lock-string-face))
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;; major-mode
@ -187,6 +193,8 @@ Uses the fast `vc-state' cache rather than synchronous git calls."
(concat " " (project-name project)))
))
(defun minmo-project () minmo--project-cache)
(add-hook 'find-file-hook #'minmo--cache-project)
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
@ -244,7 +252,7 @@ Updates only on file load and save to guarantee zero redisplay lag.")
(defvar minmo-minor-modes-face 'font-lock-keyword-face)
(defun minmo-minor-modes ()
(string-join
(concat (string-join
(delq nil (mapcar (lambda (m)
;; NOTE: bound-and-true-p does not work here, because
;; it's a macro which doesn't evaluate its arguments,
@ -255,8 +263,7 @@ Updates only on file load and save to guarantee zero redisplay lag.")
(propertize (string-trim-right (symbol-name m) "-minor-mode\\|-mode\\|--managed-mode")
'face minmo-minor-modes-face)))
minmo-minor-modes-to-show))
" "))
" ") " "))
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;; truncate
@ -278,7 +285,7 @@ Updates only on file load and save to guarantee zero redisplay lag.")
;;;;;;;;;;;;;
;; (buffer-name)
'(:eval (propertize "%b" 'face 'font-lock-string-face))
'(:eval (minmo-buffer-name))
;;;;;;;;;;;;;
;; major-mode
@ -286,7 +293,7 @@ Updates only on file load and save to guarantee zero redisplay lag.")
;;;;;;;;;;;;;
;; project
'(:eval minmo--project-cache)
'(:eval (minmo-project))
;;;;;;;;;;;;;
;; status
@ -299,7 +306,7 @@ Updates only on file load and save to guarantee zero redisplay lag.")
;;;;;;;;;;;;;
;; minor modes
'(:eval (minmo-minor-modes)) " "
'(:eval (minmo-minor-modes))
;;;;;;;;;;;;;
;; keycast