diff options
| author | Chong Yidong | 2010-10-13 23:55:18 -0400 |
|---|---|---|
| committer | Chong Yidong | 2010-10-13 23:55:18 -0400 |
| commit | 4983ddeaa82ea0d34b7dc9a6733f870da38b1c2e (patch) | |
| tree | cb865f87f119b3369fd68a4d2eefc6da7b5b95ad /lisp/custom.el | |
| parent | a974dcf2bba7eb9e3f4a407cc2ff1b714e6e7d2f (diff) | |
| download | emacs-4983ddeaa82ea0d34b7dc9a6733f870da38b1c2e.tar.gz emacs-4983ddeaa82ea0d34b7dc9a6733f870da38b1c2e.zip | |
Define a cursor defface; minor face optimizations.
* faces.el (face-spec-reset-face): Reset all attributes in one
single call to set-face-attribute.
(face-spec-match-p): Make it a defsubst.
(frame-set-background-mode): New arg KEEP-FACE-SPECS.
(x-create-frame-with-faces, tty-create-frame-with-faces)
(tty-set-up-initial-frame-faces): Don't recompute face specs in
frame-set-background-mode, since they are recomputed immediately
afterwards in face-set-after-frame-default.
(face-set-after-frame-default): Minor optimization.
(cursor): Provide non-trivial defface spec.
* custom.el (custom-theme-recalc-face): Simplify.
Diffstat (limited to 'lisp/custom.el')
| -rw-r--r-- | lisp/custom.el | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/lisp/custom.el b/lisp/custom.el index 2cb4fb2e1be..c5ebe64da3c 100644 --- a/lisp/custom.el +++ b/lisp/custom.el | |||
| @@ -1261,8 +1261,7 @@ See `custom-enabled-themes' for a list of enabled themes." | |||
| 1261 | ;; If the face spec specified by this theme is in the | 1261 | ;; If the face spec specified by this theme is in the |
| 1262 | ;; saved-face property, reset that property. | 1262 | ;; saved-face property, reset that property. |
| 1263 | (when (equal (nth 3 s) (get symbol 'saved-face)) | 1263 | (when (equal (nth 3 s) (get symbol 'saved-face)) |
| 1264 | (put symbol 'saved-face | 1264 | (put symbol 'saved-face (and val (cadr (car val))))) |
| 1265 | (and val (cadr (car val))))) | ||
| 1266 | (custom-theme-recalc-face symbol))))) | 1265 | (custom-theme-recalc-face symbol))))) |
| 1267 | (setq custom-enabled-themes | 1266 | (setq custom-enabled-themes |
| 1268 | (delq theme custom-enabled-themes))))) | 1267 | (delq theme custom-enabled-themes))))) |
| @@ -1293,7 +1292,9 @@ This function returns nil if no custom theme specifies a value for VARIABLE." | |||
| 1293 | "Set FACE according to currently enabled custom themes." | 1292 | "Set FACE according to currently enabled custom themes." |
| 1294 | (if (get face 'face-alias) | 1293 | (if (get face 'face-alias) |
| 1295 | (setq face (get face 'face-alias))) | 1294 | (setq face (get face 'face-alias))) |
| 1296 | (face-spec-set face (get face 'face-override-spec))) | 1295 | ;; Reset the faces for each frame. |
| 1296 | (dolist (frame (frame-list)) | ||
| 1297 | (face-spec-recalc face frame))) | ||
| 1297 | 1298 | ||
| 1298 | 1299 | ||
| 1299 | ;;; XEmacs compability functions | 1300 | ;;; XEmacs compability functions |