emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] /srv/bzr/emacs/trunk r107672: Fix for custom-theme-write-f


From: Chong Yidong
Subject: [Emacs-diffs] /srv/bzr/emacs/trunk r107672: Fix for custom-theme-write-faces.
Date: Sun, 25 Mar 2012 20:52:49 +0800
User-agent: Bazaar (2.3.1)

------------------------------------------------------------
revno: 107672
fixes bug(s): http://debbugs.gnu.org/9337
committer: Chong Yidong <address@hidden>
branch nick: trunk
timestamp: Sun 2012-03-25 20:52:49 +0800
message:
  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.
modified:
  lisp/ChangeLog
  lisp/cus-theme.el
=== modified file 'lisp/ChangeLog'
--- a/lisp/ChangeLog    2012-03-25 07:58:59 +0000
+++ b/lisp/ChangeLog    2012-03-25 12:52:49 +0000
@@ -1,5 +1,9 @@
 2012-03-25  Chong Yidong  <address@hidden>
 
+       * 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.
 
 2012-03-24  Simon Leinen  <address@hidden>

=== modified file 'lisp/cus-theme.el'
--- a/lisp/cus-theme.el 2012-02-11 22:13:29 +0000
+++ b/lisp/cus-theme.el 2012-03-25 12:52:49 +0000
@@ -437,14 +437,17 @@
       (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)


reply via email to

[Prev in Thread] Current Thread [Next in Thread]