summaryrefslogtreecommitdiff
path: root/lisp/custom.el
diff options
context:
space:
mode:
authorChong Yidong <cyd@stupidchicken.com>2005-09-12 22:05:17 +0000
committerChong Yidong <cyd@stupidchicken.com>2005-09-12 22:05:17 +0000
commitd5c16b05233c0c8c43f228071872e350834103c3 (patch)
treedbbf84e5d397393d5e21a6a79f28d11816ca7db1 /lisp/custom.el
parent1db2d450cbf0bfcb78edd5670a5d902c043edef2 (diff)
* custom.el (custom-push-theme): Handle the case where a symbol is
bound but face properties have not yet been assigned.
Diffstat (limited to 'lisp/custom.el')
-rw-r--r--lisp/custom.el21
1 files changed, 10 insertions, 11 deletions
diff --git a/lisp/custom.el b/lisp/custom.el
index d634160e534..cf6ef88456e 100644
--- a/lisp/custom.el
+++ b/lisp/custom.el
@@ -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