From a8aa91a257796695d0fbbf471e90bd4ea74c70a8 Mon Sep 17 00:00:00 2001 From: Craig Jennings Date: Thu, 18 Jun 2026 20:56:18 -0500 Subject: refactor(ui): remove buffer-state coloring of the buffer name The modeline colored the buffer name by write and modification state (red read-only, green modified, gold overwrite) through a classifier in user-constants.el. I removed it, the same way the matching cursor coloring was removed earlier for being more confusing than useful. The classifier had no other live user, so it and its two test files go with it. The buffer name now renders in the normal mode-line color. --- modules/modeline-config.el | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) (limited to 'modules/modeline-config.el') diff --git a/modules/modeline-config.el b/modules/modeline-config.el index f6b8ef4eb..d669425d3 100644 --- a/modules/modeline-config.el +++ b/modules/modeline-config.el @@ -15,7 +15,6 @@ ;; No external packages = no buffer issues, no native-comp errors. ;; Features: -;; - Buffer status (modified, read-only) ;; - Buffer name ;; - Major mode ;; - Version control status @@ -75,11 +74,9 @@ Example: `my-very-long-name.el' → `my-ver...me.el'" ;; -------------------------- Modeline Segments -------------------------------- (defvar-local cj/modeline-buffer-name - '(:eval (let* ((color (cj/buffer-status-color (cj/buffer-status-state))) - (name (buffer-name)) + '(:eval (let* ((name (buffer-name)) (truncated-name (cj/modeline-string-cut-middle name))) (propertize truncated-name - 'face `(:foreground ,color) 'mouse-face 'mode-line-highlight 'help-echo (concat name "\n" @@ -89,8 +86,7 @@ Example: `my-very-long-name.el' → `my-ver...me.el'" (define-key map [mode-line mouse-1] 'previous-buffer) (define-key map [mode-line mouse-3] 'next-buffer) map)))) - "Buffer name colored by modification and read-only status. -White = unmodified, Green = modified, Red = read-only, Gold = overwrite. + "Buffer name in the mode line. Truncates in narrow windows. Click to switch buffers.") (defvar-local cj/modeline-position -- cgit v1.2.3