aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCraig Jennings <c@cjennings.net>2026-06-27 13:23:03 -0400
committerCraig Jennings <c@cjennings.net>2026-06-27 13:23:03 -0400
commit8e89a7646af049af0ff836feff27bc48403dcc69 (patch)
tree06dd785d239c687932055567bb220a4d9552df5a
parent57b96cf35614c8469dc814af05ee939ad2e58215 (diff)
downloaddotemacs-8e89a7646af049af0ff836feff27bc48403dcc69.tar.gz
dotemacs-8e89a7646af049af0ff836feff27bc48403dcc69.zip
fix(reader): exclude eww and nov from global font-lock so shr colors show
eww and nov both render with shr, which paints buffers with manual face properties, and global font-lock was overwriting them with syntactic string fontification, the same bug just fixed for elfeed. An audit of live buffers caught nov directly (two open epub buffers, faces clobbered). eww has font-lock-defaults nil too and is the same shr-rendered pattern as the already-excluded elfeed-show and mu4e-view, so I excluded it alongside. The *sdcv* dictionary buffer has its own font-lock-defaults, so its font-lock is by design and left alone.
-rw-r--r--modules/calibredb-epub-config.el6
-rw-r--r--modules/eww-config.el6
2 files changed, 12 insertions, 0 deletions
diff --git a/modules/calibredb-epub-config.el b/modules/calibredb-epub-config.el
index 1e6437d26..f833c2503 100644
--- a/modules/calibredb-epub-config.el
+++ b/modules/calibredb-epub-config.el
@@ -404,6 +404,12 @@ Try to use the Calibre book id from the parent folder name (for example,
(calibredb-search-keyword-filter "")
(message "CalibreDB: no metadata; showing all"))))))
+(require 'system-lib)
+;; nov renders epub via shr, which paints with manual `face' properties. Left in
+;; `global-font-lock-mode' font-lock overwrites them and the book loses its
+;; colors, the same issue as elfeed-show and mu4e-view. Exclude nov-mode.
+(cj/exclude-from-global-font-lock 'nov-mode)
+
(use-package nov
:mode
("\\.epub\\'" . nov-mode)
diff --git a/modules/eww-config.el b/modules/eww-config.el
index ff7ddc211..3b0e22dcd 100644
--- a/modules/eww-config.el
+++ b/modules/eww-config.el
@@ -73,6 +73,12 @@
;; --------------------------------- EWW Config --------------------------------
+(require 'system-lib)
+;; eww renders pages with shr, which paints with manual `face' properties. Left
+;; in `global-font-lock-mode' font-lock overwrites them and the page loses its
+;; colors, the same issue as elfeed-show and mu4e-view. Exclude eww-mode.
+(cj/exclude-from-global-font-lock 'eww-mode)
+
(use-package eww
:ensure nil ;; built-in
:bind