]> git.eshelyaron.com Git - emacs.git/commitdiff
* custom.el (custom-push-theme): Handle the case where a symbol is
authorChong Yidong <cyd@stupidchicken.com>
Mon, 12 Sep 2005 22:05:17 +0000 (22:05 +0000)
committerChong Yidong <cyd@stupidchicken.com>
Mon, 12 Sep 2005 22:05:17 +0000 (22:05 +0000)
bound but face properties have not yet been assigned.

lisp/ChangeLog
lisp/custom.el

index f9abe4ca871eb7c4c5b7a4271ee3a4e7709e37d7..2074b5d3f0295a642597b4403ca23d554c807b27 100644 (file)
@@ -1,5 +1,8 @@
 2005-09-13  Chong Yidong  <cyd@stupidchicken.com>
 
+       * custom.el (custom-push-theme): Handle the case where a symbol is
+       bound but face properties have not yet been assigned.
+
        * mail/sendmail.el (mail): Use new buffer if `noerase' argument is
        `new'.
 
index d634160e534fbfcf151d894e2d42bd154a11f6d9..cf6ef88456e66488b58ba36f83c961af0a80a6b9 100644 (file)
@@ -649,17 +649,16 @@ See `custom-known-themes' for a list of known themes."
        (progn
          (setcar (cdr setting) mode)
          (setcar (cddr setting) value))
-      (if (and (null old)
-              (boundp symbol))
-         (setq old
-               (list
-                (list 'standard 'set
-                      (if (eq prop 'theme-value)
-                          (symbol-value symbol)
-                        (list
-                         (append
-                          '(t)
-                          (custom-face-attributes-get symbol nil))))))))
+      ;; If no custom theme has been applied yet, first save the
+      ;; current values to the 'standard theme.
+      (if (null old)
+         (if (and (eq prop 'theme-value)
+                  (boundp symbol))
+             (setq old
+                   (list (list 'standard 'set (symbol-value symbol))))
+           (if (facep symbol)
+               (setq old (list (list 'standard 'set (list
+                 (append '(t) (custom-face-attributes-get symbol nil)))))))))
       (put symbol prop (cons (list theme mode value) old)))
     ;; Record, for each theme, all its settings.
     (put theme 'theme-settings