Commit dd470960 authored by Chong Yidong's avatar Chong Yidong
Browse files

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
parent 9a69676a
2012-03-25 Chong Yidong <cyd@gnu.org> 2012-03-25 Chong Yidong <cyd@gnu.org>
* 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 (Bug#9337).
* button.el (button-at): Minor addition to docstring. * button.el (button-at): Minor addition to docstring.
2012-03-24 Simon Leinen <simon.leinen@gmail.com> 2012-03-24 Simon Leinen <simon.leinen@gmail.com>
......
...@@ -437,14 +437,17 @@ It includes all faces in list FACES." ...@@ -437,14 +437,17 @@ It includes all faces in list FACES."
(princ theme) (princ theme)
(princ "\n") (princ "\n")
(dolist (spec faces) (dolist (spec faces)
;; Insert the face iff the checkbox widget is checked.
(when (widget-get (nth 1 spec) :value) (when (widget-get (nth 1 spec) :value)
(let* ((symbol (nth 0 spec)) (let* ((symbol (nth 0 spec))
(widget (nth 2 spec)) (widget (nth 2 spec))
(value (value
(if (car-safe (widget-get widget :children)) (cond
(custom-face-widget-to-spec widget) ((car-safe (widget-get widget :children))
;; Child is null if the widget is closed (hidden). (custom-face-widget-to-spec widget))
(widget-get widget :shown-value)))) ;; 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) (when (and (facep symbol) value)
(princ (if (bolp) " '(" "\n '(")) (princ (if (bolp) " '(" "\n '("))
(prin1 symbol) (prin1 symbol)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment