aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCraig Jennings <c@cjennings.net>2026-06-26 12:57:45 -0400
committerCraig Jennings <c@cjennings.net>2026-06-26 12:57:45 -0400
commit7971721e4ffbbda86aca85d974e19928e06559b4 (patch)
tree96cf4939145fdd0d9503a53fb13d3638dd48d184
parent78f699e20c79b425126571427f33b97bdd632f34 (diff)
downloaddotemacs-7971721e4ffbbda86aca85d974e19928e06559b4.tar.gz
dotemacs-7971721e4ffbbda86aca85d974e19928e06559b4.zip
fix(eat): exclude eat-mode from global font-lock
EAT paints its whole palette with manual face text properties. Inside global-font-lock-mode the terminal buffer also got syntactic fontification, so a quoted string in program output (a diff shown by Claude Code) became font-lock-string-face and overrode the foreground EAT had painted. The result was the theme's string green over the green diff-added background, green on green. I excluded eat-mode the same way dashboard and mu4e are, through cj/exclude-from-global-font-lock. A mode-hook can't do it because global font-lock runs after the mode hook.
-rw-r--r--modules/eat-config.el9
1 files changed, 9 insertions, 0 deletions
diff --git a/modules/eat-config.el b/modules/eat-config.el
index 74012b9b6..ee83adf10 100644
--- a/modules/eat-config.el
+++ b/modules/eat-config.el
@@ -21,6 +21,7 @@
;;; Code:
(require 'keybindings)
+(require 'system-lib)
(require 'cj-window-geometry-lib)
(require 'cj-window-toggle-lib)
@@ -31,6 +32,14 @@
(defvar eshell-buffer-name)
(defvar cj/custom-keymap)
+;; EAT paints its palette with manual `face' text properties (the ANSI colors).
+;; Left in `global-font-lock-mode', the terminal buffer also gets syntactic
+;; fontification -- a "..." in program output becomes `font-lock-string-face',
+;; overriding the foreground EAT painted (e.g. green-on-green inside a diff) --
+;; so exclude eat-mode, the same reason dashboard and mu4e are excluded. A
+;; mode-hook can't do this: `global-font-lock-mode' runs after the mode hook.
+(cj/exclude-from-global-font-lock 'eat-mode)
+
(defun cj/turn-off-chrome-for-term ()
"Turn off line numbers and hl-line in a terminal buffer."
(hl-line-mode -1)