Mercurial > emacs
comparison lisp/faces.el @ 10193:6efa61f222cb
(frame-update-face-colors): New function.
author | Richard M. Stallman <rms@gnu.org> |
---|---|
date | Tue, 20 Dec 1994 20:42:57 +0000 |
parents | 5fc240a3e4a0 |
children | 8652c7b84a5f |
comparison
equal
deleted
inserted
replaced
10192:dd28f1cd68d2 | 10193:6efa61f222cb |
---|---|
951 (italic | 951 (italic |
952 (make-face-italic face frame t))))) | 952 (make-face-italic face frame t))))) |
953 (setq rest (cdr rest))) | 953 (setq rest (cdr rest))) |
954 frame))) | 954 frame))) |
955 | 955 |
956 ;; Update the colors of FACE, after FRAME's own colors have been changed. | |
957 ;; This applies only to faces with global color specifications | |
958 ;; that are not simple constants. | |
959 (defun frame-update-face-colors (frame) | |
960 (let ((faces global-face-data)) | |
961 (while faces | |
962 (condition-case nil | |
963 (let* ((data (cdr (car faces))) | |
964 (face (car (car faces))) | |
965 (foreground (face-foreground data)) | |
966 (background (face-background data))) | |
967 ;; If the global spec is a specific color, | |
968 ;; which doesn't depend on the frame's attributes, | |
969 ;; we don't need to recalculate it now. | |
970 (or (listp foreground) | |
971 (setq foreground nil)) | |
972 (or (listp background) | |
973 (setq background nil)) | |
974 ;; If we are going to frob this face at all, | |
975 ;; reinitialize it first. | |
976 (if (or foreground background) | |
977 (progn (set-face-foreground face nil frame) | |
978 (set-face-background face nil frame))) | |
979 (if foreground | |
980 (face-try-color-list 'set-face-foreground | |
981 face foreground frame)) | |
982 (if background | |
983 (face-try-color-list 'set-face-background | |
984 face background frame))) | |
985 (error nil)) | |
986 (setq faces (cdr faces))))) | |
987 | |
956 ;; Fill in the face FACE from frame-independent face data DATA. | 988 ;; Fill in the face FACE from frame-independent face data DATA. |
957 ;; DATA should be the non-frame-specific ("global") face vector | 989 ;; DATA should be the non-frame-specific ("global") face vector |
958 ;; for the face. FACE should be a face name or face object. | 990 ;; for the face. FACE should be a face name or face object. |
959 ;; FRAME is the frame to act on; it must be an actual frame, not nil or t. | 991 ;; FRAME is the frame to act on; it must be an actual frame, not nil or t. |
960 (defun face-fill-in (face data frame) | 992 (defun face-fill-in (face data frame) |