summaryrefslogtreecommitdiff
path: root/lisp/cus-theme.el
diff options
context:
space:
mode:
authorChong Yidong <cyd@gnu.org>2012-03-25 20:52:49 +0800
committerChong Yidong <cyd@gnu.org>2012-03-25 20:52:49 +0800
commitdd470960273e61040446549c2f6c549c0fdb483a (patch)
tree25ed9d9ff00b2df93faa4ab5b67ce69889ad4108 /lisp/cus-theme.el
parent9a69676ae6edeaa03930ccba6410a3e6d7f34596 (diff)
downloademacs-dd470960273e61040446549c2f6c549c0fdb483a.tar.gz
Fix for custom-theme-write-faces.
* lisp/cus-theme.el (custom-theme-write-faces): Retrieve current face spec with custom-face-get-current-spec if its :shown-value is not determined yet. Fixes: debbugs:9337
Diffstat (limited to 'lisp/cus-theme.el')
-rw-r--r--lisp/cus-theme.el11
1 files changed, 7 insertions, 4 deletions
diff --git a/lisp/cus-theme.el b/lisp/cus-theme.el
index 79799049378..ba2fa969fc4 100644
--- a/lisp/cus-theme.el
+++ b/lisp/cus-theme.el
@@ -437,14 +437,17 @@ It includes all faces in list FACES."
(princ theme)
(princ "\n")
(dolist (spec faces)
+ ;; Insert the face iff the checkbox widget is checked.
(when (widget-get (nth 1 spec) :value)
(let* ((symbol (nth 0 spec))
(widget (nth 2 spec))
(value
- (if (car-safe (widget-get widget :children))
- (custom-face-widget-to-spec widget)
- ;; Child is null if the widget is closed (hidden).
- (widget-get widget :shown-value))))
+ (cond
+ ((car-safe (widget-get widget :children))
+ (custom-face-widget-to-spec widget))
+ ;; Child is null if the widget is closed (hidden).
+ ((widget-get widget :shown-value))
+ (t (custom-face-get-current-spec symbol)))))
(when (and (facep symbol) value)
(princ (if (bolp) " '(" "\n '("))
(prin1 symbol)