From 8e89a7646af049af0ff836feff27bc48403dcc69 Mon Sep 17 00:00:00 2001 From: Craig Jennings Date: Sat, 27 Jun 2026 13:23:03 -0400 Subject: 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. --- modules/calibredb-epub-config.el | 6 ++++++ modules/eww-config.el | 6 ++++++ 2 files changed, 12 insertions(+) (limited to 'modules') 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 -- cgit v1.2.3