diff options
| author | Chong Yidong | 2013-12-21 23:31:09 +0800 |
|---|---|---|
| committer | Chong Yidong | 2013-12-21 23:31:09 +0800 |
| commit | aac2b673c3083ab612bcd57fbcd9d370078bd8da (patch) | |
| tree | d5fc1b92e5f70e0d3af72467df2b3bf7e476f908 /lisp/custom.el | |
| parent | bacb0e7791b68b1b0a254c09910d666087a386b5 (diff) | |
| download | emacs-aac2b673c3083ab612bcd57fbcd9d370078bd8da.tar.gz emacs-aac2b673c3083ab612bcd57fbcd9d370078bd8da.zip | |
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." | |||
| 1459 | (eval (car valspec)))))) | 1459 | (eval (car valspec)))))) |
| 1460 | 1460 | ||
| 1461 | (defun custom-theme-recalc-face (face) | 1461 | (defun custom-theme-recalc-face (face) |
| 1462 | "Set FACE according to currently enabled custom themes." | 1462 | "Set FACE according to currently enabled custom themes. |
| 1463 | If FACE is not initialized as a face, do nothing; otherwise call | ||
| 1464 | `face-spec-recalc' to recalculate the face on all frames." | ||
| 1463 | (if (get face 'face-alias) | 1465 | (if (get face 'face-alias) |
| 1464 | (setq face (get face 'face-alias))) | 1466 | (setq face (get face 'face-alias))) |
| 1465 | ;; Reset the faces for each frame. | 1467 | (if (facep face) |
| 1466 | (dolist (frame (frame-list)) | 1468 | ;; Reset the faces for each frame. |
| 1467 | (face-spec-recalc face frame))) | 1469 | (dolist (frame (frame-list)) |
| 1470 | (face-spec-recalc face frame)))) | ||
| 1468 | 1471 | ||
| 1469 | 1472 | ||
| 1470 | ;;; XEmacs compatibility functions | 1473 | ;;; XEmacs compatibility functions |