]> code.delx.au - gnu-emacs-elpa/commitdiff
Add missing case for a theme that does not set faces.
authorJackson Ray Hamilton <jackson@jacksonrayhamilton.com>
Sun, 8 Feb 2015 12:48:21 +0000 (04:48 -0800)
committerJackson Ray Hamilton <jackson@jacksonrayhamilton.com>
Sun, 8 Feb 2015 12:48:21 +0000 (04:48 -0800)
context-coloring.el
test/context-coloring-test.el

index 4d6c172cf7e0cf05e8faefecc374e3b3fcd870d1..ede7e9b71774f9e9061875cc8290db305efd22bd 100644 (file)
@@ -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
index 9b636cce1ac520091f83b36b6dcce13cad31a746..757f0d779341e660c36d542bdd2c05969bab5cd8 100644 (file)
@@ -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")