# HG changeset patch # User Chong Yidong # Date 1126562717 0 # Node ID c60d119298c40ef6ecdb6da57d42a93f37f8d2f2 # Parent 2cbd801671c4c23ed9ac685e6216363b3064544d * custom.el (custom-push-theme): Handle the case where a symbol is bound but face properties have not yet been assigned. diff -r 2cbd801671c4 -r c60d119298c4 lisp/ChangeLog --- a/lisp/ChangeLog Mon Sep 12 21:58:21 2005 +0000 +++ b/lisp/ChangeLog Mon Sep 12 22:05:17 2005 +0000 @@ -1,5 +1,8 @@ 2005-09-13 Chong Yidong + * 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'. diff -r 2cbd801671c4 -r c60d119298c4 lisp/custom.el --- a/lisp/custom.el Mon Sep 12 21:58:21 2005 +0000 +++ b/lisp/custom.el Mon Sep 12 22:05:17 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