Mercurial > emacs
comparison lisp/custom.el @ 110977:a5cd85a6290e
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.
author | Chong Yidong <cyd@stupidchicken.com> |
---|---|
date | Wed, 13 Oct 2010 23:55:18 -0400 |
parents | c84f553cca36 |
children | fedd4f6fa7e5 |
comparison
equal
deleted
inserted
replaced
110976:c62e42a9ebc4 | 110977:a5cd85a6290e |
---|---|
1259 (custom-theme-recalc-variable symbol)) | 1259 (custom-theme-recalc-variable symbol)) |
1260 ((eq prop 'theme-face) | 1260 ((eq prop 'theme-face) |
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))))) |
1269 | 1268 |
1270 (defun custom-variable-theme-value (variable) | 1269 (defun custom-variable-theme-value (variable) |
1291 | 1290 |
1292 (defun custom-theme-recalc-face (face) | 1291 (defun custom-theme-recalc-face (face) |
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 |
1300 | 1301 |
1301 ;; In XEmacs, when you reset a Custom Theme, you have to specify the | 1302 ;; In XEmacs, when you reset a Custom Theme, you have to specify the |