diff options
author | Chong Yidong <cyd@gnu.org> | 2013-12-21 23:31:09 +0800 |
---|---|---|
committer | Chong Yidong <cyd@gnu.org> | 2013-12-21 23:31:09 +0800 |
commit | aac2b673c3083ab612bcd57fbcd9d370078bd8da (patch) | |
tree | d5fc1b92e5f70e0d3af72467df2b3bf7e476f908 /lisp/custom.el | |
parent | bacb0e7791b68b1b0a254c09910d666087a386b5 (diff) | |
download | emacs-aac2b673c3083ab612bcd57fbcd9d370078bd8da.tar.gz |
Don't make faces when loading Custom themes.
* custom.el (custom-theme-recalc-face): Do nothing if the face is
undefined. Thus, theme settings for undefined faces do not take
effect until the faces are defined with defface, the same as with
theme variables.
* faces.el (face-spec-set): Use face-spec-recalc in all cases.
(face-spec-reset-face): Don't assign extra properties in temacs.
(face-spec-recalc): Apply X resources too.
Diffstat (limited to 'lisp/custom.el')
-rw-r--r-- | lisp/custom.el | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/lisp/custom.el b/lisp/custom.el index 8b675c4a743..58477a58ad3 100644 --- a/lisp/custom.el +++ b/lisp/custom.el @@ -1459,12 +1459,15 @@ This function returns nil if no custom theme specifies a value for VARIABLE." (eval (car valspec)))))) (defun custom-theme-recalc-face (face) - "Set FACE according to currently enabled custom themes." + "Set FACE according to currently enabled custom themes. +If FACE is not initialized as a face, do nothing; otherwise call +`face-spec-recalc' to recalculate the face on all frames." (if (get face 'face-alias) (setq face (get face 'face-alias))) - ;; Reset the faces for each frame. - (dolist (frame (frame-list)) - (face-spec-recalc face frame))) + (if (facep face) + ;; Reset the faces for each frame. + (dolist (frame (frame-list)) + (face-spec-recalc face frame)))) ;;; XEmacs compatibility functions |