From 37d92510afbaea8609e8aa3612c6e9d27edba12d Mon Sep 17 00:00:00 2001 From: Craig Jennings Date: Thu, 2 Jul 2026 00:00:41 -0400 Subject: feat(modeline): mode icons, status segments, and a repair command I rebuilt the custom modeline as pure segment helpers with thin :eval wiring: - The nerd-icons mode icon replaces the mode-name text (cached per buffer, plain name on terminal frames), with the full mode name in the help-echo. - New left-side segments: modified dot / read-only lock (file buffers only), remote @host tag, Narrow tag that widens on click, point-based percentage, region selection info, and a MACRO tag while a keyboard macro records. - New right-side segments: mode-line-process (eat and compilation state was invisible) and flycheck per-severity counts with click-through to the error list, replacing the stock status text. Glyphs are nerd-icons private-use codepoints so emojify can't rewrite them, with text fallbacks when icons are unavailable. - cj/modeline-reset kills a hijacked buffer-local mode-line-format (two-column mode, ediff, calc). - Optional taller bar via cj/modeline-height-factor, a display height property on the padding space so the theme's mode-line faces stay untouched. - Housekeeping: the dead user-constants require and stale commentary are gone, cj/modeline-vc-faces left the risky-local-variable list, and the cache-key defun is cj/--modeline-vc-cache-key so it no longer shadows the same-named defvar. Percent signs from :eval strings go through the mode-line %-construct pass, so the position segment emits %% for a literal percent. --- tests/test-modeline-config-vc-cache-key.el | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'tests/test-modeline-config-vc-cache-key.el') diff --git a/tests/test-modeline-config-vc-cache-key.el b/tests/test-modeline-config-vc-cache-key.el index 6ba7985c..38052949 100644 --- a/tests/test-modeline-config-vc-cache-key.el +++ b/tests/test-modeline-config-vc-cache-key.el @@ -17,20 +17,20 @@ (ert-deftest test-modeline-vc-cache-key-is-file-and-show-remote () "Normal: the key is (FILE SHOW-REMOTE), with no per-render file-truename stat." (let ((cj/modeline-vc-show-remote nil)) - (should (equal (cj/modeline-vc-cache-key "/x/y.el") '("/x/y.el" nil))))) + (should (equal (cj/--modeline-vc-cache-key "/x/y.el") '("/x/y.el" nil))))) (ert-deftest test-modeline-vc-cache-key-tracks-show-remote () "Boundary: toggling show-remote yields a different key (separate cache entry)." (should-not (equal (let ((cj/modeline-vc-show-remote nil)) - (cj/modeline-vc-cache-key "/x/y.el")) + (cj/--modeline-vc-cache-key "/x/y.el")) (let ((cj/modeline-vc-show-remote t)) - (cj/modeline-vc-cache-key "/x/y.el"))))) + (cj/--modeline-vc-cache-key "/x/y.el"))))) (ert-deftest test-modeline-vc-cache-key-stable-for-same-file () "Boundary: the key is stable across calls for an unchanged file + show-remote." (let ((cj/modeline-vc-show-remote nil)) - (should (equal (cj/modeline-vc-cache-key "/x/y.el") - (cj/modeline-vc-cache-key "/x/y.el"))))) + (should (equal (cj/--modeline-vc-cache-key "/x/y.el") + (cj/--modeline-vc-cache-key "/x/y.el"))))) (provide 'test-modeline-config-vc-cache-key) ;;; test-modeline-config-vc-cache-key.el ends here -- cgit v1.2.3