branch: elpa/alect-themes
commit 4c25d223bc52c6e4ef5591a5c14411dc3fe4bce1
Author: Alex Kost <[email protected]>
Commit: Alex Kost <[email protected]>
Update README for Emacs 24.4
---
README.md | 45 +++++++++++++++++++++++----------------------
1 file changed, 23 insertions(+), 22 deletions(-)
diff --git a/README.md b/README.md
index 366ee9d..607333b 100644
--- a/README.md
+++ b/README.md
@@ -247,30 +247,31 @@ instead of the themed colored buttons (the right picture):
<img src="http://i.imgur.com/66G9VvX.png" title="alect-light - Custom-mode
(proper colors)"/></a>
This happens because Emacs applies default face settings even for a
-themed face. This behaviour is changed in new versions of Emacs: since
-24.4 (not released yet) you will always get pure themes without
-unintended face settings. If you use a previous version of Emacs, you
-can try the following workaround to achieve the new behaviour:
+themed face. This behaviour is changed in the new versions of Emacs:
+since 24.4 you will always get pure themes without unintended face
+settings. If you use a previous version, you can try the following
+workaround to achieve the new behaviour:
```elisp
-(defun face-spec-recalc-new (face frame)
- "Improved version of `face-spec-recalc'."
- (while (get face 'face-alias)
- (setq face (get face 'face-alias)))
- (face-spec-reset-face face frame)
- ;; If FACE is customized or themed, set the custom spec from
- ;; `theme-face' records, which completely replace the defface spec
- ;; rather than inheriting from it.
- (let ((theme-faces (get face 'theme-face)))
- (if theme-faces
- (dolist (spec (reverse theme-faces))
- (face-spec-set-2 face frame (cadr spec)))
- (face-spec-set-2 face frame (face-default-spec face))))
- (face-spec-set-2 face frame (get face 'face-override-spec)))
-
-(defadvice face-spec-recalc (around new-recalc (face frame) activate)
- "Use `face-spec-recalc-new' instead."
- (face-spec-recalc-new face frame))
+(when (version< emacs-version "24.3.50")
+ (defun face-spec-recalc-new (face frame)
+ "Improved version of `face-spec-recalc'."
+ (while (get face 'face-alias)
+ (setq face (get face 'face-alias)))
+ (face-spec-reset-face face frame)
+ ;; If FACE is customized or themed, set the custom spec from
+ ;; `theme-face' records, which completely replace the defface spec
+ ;; rather than inheriting from it.
+ (let ((theme-faces (get face 'theme-face)))
+ (if theme-faces
+ (dolist (spec (reverse theme-faces))
+ (face-spec-set-2 face frame (cadr spec)))
+ (face-spec-set-2 face frame (face-default-spec face))))
+ (face-spec-set-2 face frame (get face 'face-override-spec)))
+
+ (defadvice face-spec-recalc (around new-recalc (face frame) activate)
+ "Use `face-spec-recalc-new' instead."
+ (face-spec-recalc-new face frame)))
```
That version of `face-spec-recalc` (wrapped with advice) is one of the