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
commit933aa670cb2b5bc7ac3feefd07a88606a012be28 (patch)
tree497799420bb27ce05426fd84127b44c87a5d5d75
parent85a78195cda17f075d416c6f49c0cbb75b68c68a (diff)
downloaddotemacs-933aa670cb2b5bc7ac3feefd07a88606a012be28.tar.gz
dotemacs-933aa670cb2b5bc7ac3feefd07a88606a012be28.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)