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
commit1d541ceafbfff6b9972d165e985657bc9c591d8b (patch)
tree1fb1e5b4cbd30159c305ab54650da0ea315775f2
parent203acd4ed8c56e166a0af690d280e4da6cf665e5 (diff)
downloaddotemacs-1d541ceafbfff6b9972d165e985657bc9c591d8b.tar.gz
dotemacs-1d541ceafbfff6b9972d165e985657bc9c591d8b.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)