diff lisp/custom.el @ 90228:fa0da9b57058

Revision: miles@gnu.org--gnu-2005/emacs--unicode--0--patch-82 Merge from emacs--cvs-trunk--0 Patches applied: * emacs--cvs-trunk--0 (patch 542-553) - Update from CVS - Merge from gnus--rel--5.10 * gnus--rel--5.10 (patch 116-121) - Merge from emacs--cvs-trunk--0 - Update from CVS
author Miles Bader <miles@gnu.org>
date Mon, 19 Sep 2005 10:20:33 +0000
parents df78f2fb8f6a c60d119298c4
children 7beb78bc1f8e
line wrap: on
line diff
--- a/lisp/custom.el	Sun Sep 11 22:21:01 2005 +0000
+++ b/lisp/custom.el	Mon Sep 19 10:20:33 2005 +0000
@@ -649,17 +649,16 @@
 	(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