From 32cfe216b4f5917b1a979e0372edf9b8f1ab62ea Mon Sep 17 00:00:00 2001 From: Craig Jennings Date: Mon, 25 May 2026 11:54:39 -0500 Subject: fix(theme): register dupre faces so org status colors are themed The dupre theme defined its own faces (dupre-accent, the headings, and the org status faces) only through custom-theme-set-faces, never defface. That leaves them unregistered, so they render through :inherit but silently fail when applied directly as a text property. org-todo-keyword-faces and org-priority-faces apply faces that way, so the org keyword and priority colors never showed as dupre tones. I added a defface registration block to dupre-faces.el for all of dupre's own faces, so they're real faces. The theme still sets their colors. Then I pointed org-todo-keyword-faces and org-priority-faces (in org-config.el) at named dupre-org-* faces, each the closest palette color to its former hard-coded name, and gave each a dimmed variant that auto-dim-config.el swaps in for unfocused windows. A keyword in a dimmed window now shows a darker shade of its own color rather than flat gray or full brightness. A regression test asserts dupre's faces stay registered, since that was the latent bug behind all of this. --- modules/auto-dim-config.el | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) (limited to 'modules/auto-dim-config.el') diff --git a/modules/auto-dim-config.el b/modules/auto-dim-config.el index 83c5b17c7..5ce426d23 100644 --- a/modules/auto-dim-config.el +++ b/modules/auto-dim-config.el @@ -54,7 +54,23 @@ (font-lock-constant-face . (auto-dim-other-buffers . nil)) (font-lock-builtin-face . (auto-dim-other-buffers . nil)) (font-lock-preprocessor-face . (auto-dim-other-buffers . nil)) - (font-lock-warning-face . (auto-dim-other-buffers . nil)))) + (font-lock-warning-face . (auto-dim-other-buffers . nil)) + ;; Org TODO-keyword + priority faces dim to their own -dim variant + ;; (a darker shade of the same colour) rather than the flat gray, so + ;; a dimmed window's keywords stay recognizable. Faces are defined + ;; in themes/dupre-faces.el and wired in modules/org-config.el. + (dupre-org-todo . (dupre-org-todo-dim . nil)) + (dupre-org-project . (dupre-org-project-dim . nil)) + (dupre-org-doing . (dupre-org-doing-dim . nil)) + (dupre-org-waiting . (dupre-org-waiting-dim . nil)) + (dupre-org-verify . (dupre-org-verify-dim . nil)) + (dupre-org-stalled . (dupre-org-stalled-dim . nil)) + (dupre-org-failed . (dupre-org-failed-dim . nil)) + (dupre-org-done . (dupre-org-done-dim . nil)) + (dupre-org-priority-a . (dupre-org-priority-a-dim . nil)) + (dupre-org-priority-b . (dupre-org-priority-b-dim . nil)) + (dupre-org-priority-c . (dupre-org-priority-c-dim . nil)) + (dupre-org-priority-d . (dupre-org-priority-d-dim . nil)))) (auto-dim-other-buffers-mode 1)) (provide 'auto-dim-config) -- cgit v1.2.3