branch: master commit 2090e5d935b468503f6a09350946aa00ad49d0e2 Author: Jackson Ray Hamilton <jack...@jacksonrayhamilton.com> Commit: Jackson Ray Hamilton <jack...@jacksonrayhamilton.com>
Add missing case for a theme that does not set faces. --- context-coloring.el | 9 +++++---- test/context-coloring-test.el | 20 ++++++++++++++++++++ 2 files changed, 25 insertions(+), 4 deletions(-) diff --git a/context-coloring.el b/context-coloring.el index 4d6c172..ede7e9b 100644 --- a/context-coloring.el +++ b/context-coloring.el @@ -602,10 +602,11 @@ theme's author's colors instead." (when (and defined (not recede) (not override)) - (context-coloring-warn-theme-defined name))) - ;; Set (or overwrite) colors. - (when (not recede) - (context-coloring-apply-theme name)))))) + (context-coloring-warn-theme-defined name)) + ;; Set (or overwrite) colors. + (when (not (and defined + recede)) + (context-coloring-apply-theme name))))))) (defun context-coloring-load-theme (&optional rest) (declare diff --git a/test/context-coloring-test.el b/test/context-coloring-test.el index 9b636cc..757f0d7 100644 --- a/test/context-coloring-test.el +++ b/test/context-coloring-test.el @@ -470,6 +470,26 @@ t for a theme with SETTINGS." :colors '("#cccccc" "#dddddd")) (context-coloring-test-assert-no-message "*Warnings*") + (context-coloring-test-assert-face 0 "#aaaaaa") + (context-coloring-test-assert-face 1 "#bbbbbb") + (enable-theme theme) + (context-coloring-test-assert-no-message "*Warnings*") + (context-coloring-test-assert-face 0 "#aaaaaa") + (context-coloring-test-assert-face 1 "#bbbbbb")) + +(context-coloring-test-deftest-define-theme post-recede-not-defined + (context-coloring-test-deftheme theme) + (custom-theme-set-faces + theme + '(foo-face ((t (:foreground "#ffffff"))))) + (context-coloring-define-theme + theme + :recede t + :colors '("#aaaaaa" + "#bbbbbb")) + (context-coloring-test-assert-no-message "*Warnings*") + (context-coloring-test-assert-face 0 "#aaaaaa") + (context-coloring-test-assert-face 1 "#bbbbbb") (enable-theme theme) (context-coloring-test-assert-no-message "*Warnings*") (context-coloring-test-assert-face 0 "#aaaaaa")