[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] master ce5c6d9 07/31: Write and pass post-recede test.
From: |
Jackson Ray Hamilton |
Subject: |
[elpa] master ce5c6d9 07/31: Write and pass post-recede test. |
Date: |
Mon, 09 Feb 2015 01:09:31 +0000 |
branch: master
commit ce5c6d9ce510627dd5d879eeb738321192fc9e6a
Author: Jackson Ray Hamilton <address@hidden>
Commit: Jackson Ray Hamilton <address@hidden>
Write and pass post-recede test.
---
context-coloring.el | 9 ++++++---
test/context-coloring-test.el | 19 ++++++++++++++++++-
2 files changed, 24 insertions(+), 4 deletions(-)
diff --git a/context-coloring.el b/context-coloring.el
index 06bd92c..0f2f9fa3 100644
--- a/context-coloring.el
+++ b/context-coloring.el
@@ -572,14 +572,16 @@ raised, at which point you may want to enable the
`:override'
option, or just delete your theme and opt to use your custom
theme's author's colors instead."
(let ((aliases (plist-get properties :aliases))
- (override (plist-get properties :override)))
+ (override (plist-get properties :override))
+ (recede (plist-get properties :recede)))
(dolist (name (append `(,theme) aliases))
(when (and (not override)
(context-coloring-theme-definedp name))
(context-coloring-warn-theme-defined name))
(puthash name properties context-coloring-theme-hash-table)
;; Set (or overwrite) colors.
- (when (custom-theme-p name)
+ (when (and (custom-theme-p name)
+ (not recede))
(context-coloring-apply-theme name)))))
(defun context-coloring-load-theme (&optional rest)
@@ -605,7 +607,8 @@ THEME."
(context-coloring-apply-theme theme)))))
(t
(let ((defined (context-coloring-theme-definedp theme)))
- (when (and defined (not override))
+ (when (and defined
+ (not override))
(context-coloring-warn-theme-defined theme))
(context-coloring-apply-theme theme))))))
diff --git a/test/context-coloring-test.el b/test/context-coloring-test.el
index c6a29e6..c81be7c 100644
--- a/test/context-coloring-test.el
+++ b/test/context-coloring-test.el
@@ -430,7 +430,7 @@ t for a theme with SETTINGS."
(context-coloring-test-assert-face 0 "#cccccc")
(context-coloring-test-assert-face 1 "#dddddd"))
-(context-coloring-test-deftest-define-theme preexisting-recede
+(context-coloring-test-deftest-define-theme pre-recede
(context-coloring-define-theme
theme
:recede t
@@ -446,6 +446,23 @@ t for a theme with SETTINGS."
(context-coloring-test-assert-face 0 "#cccccc")
(context-coloring-test-assert-face 1 "#dddddd"))
+(context-coloring-test-deftest-define-theme post-recede
+ (context-coloring-test-deftheme theme)
+ (custom-theme-set-faces
+ theme
+ '(context-coloring-level-0-face ((t (:foreground "#aaaaaa"))))
+ '(context-coloring-level-1-face ((t (:foreground "#bbbbbb")))))
+ (context-coloring-define-theme
+ theme
+ :recede t
+ :colors '("#cccccc"
+ "#dddddd"))
+ (context-coloring-test-assert-no-message "*Warnings*")
+ (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
preexisting-unintentional-obstinance
(context-coloring-define-theme
theme
- [elpa] master updated (2fb700c -> f664821), Jackson Ray Hamilton, 2015/02/08
- [elpa] master 15b38a8 01/31: Cleanup., Jackson Ray Hamilton, 2015/02/08
- [elpa] master 2b6d30e 05/31: Document context-coloring-define-theme., Jackson Ray Hamilton, 2015/02/08
- [elpa] master ce5c6d9 07/31: Write and pass post-recede test.,
Jackson Ray Hamilton <=
- [elpa] master 4c7082f 06/31: Spaces., Jackson Ray Hamilton, 2015/02/08
- [elpa] master 2875503 04/31: Write and pass tests for context-coloring-define-theme and recede and override properties., Jackson Ray Hamilton, 2015/02/08
- [elpa] master 874982e 08/31: Update test names., Jackson Ray Hamilton, 2015/02/08
- [elpa] master 06efd73 09/31: Fix assertion so tests fail., Jackson Ray Hamilton, 2015/02/08
- [elpa] master 23a12b8 12/31: Rename test., Jackson Ray Hamilton, 2015/02/08
- [elpa] master 06a7606 10/31: Pass / update tests for warnings., Jackson Ray Hamilton, 2015/02/08
- [elpa] master 6e6bc61 15/31: Rename themep to theme-p., Jackson Ray Hamilton, 2015/02/08
- [elpa] master 0f036c9 13/31: Improve documentation for themes., Jackson Ray Hamilton, 2015/02/08
- [elpa] master ca7122c 16/31: Remove `when'., Jackson Ray Hamilton, 2015/02/08
- [elpa] master 71a1a0c 14/31: Rename ambiguous "defined" to "originally set"., Jackson Ray Hamilton, 2015/02/08