Mercurial > emacs
changeset 7019:74edb669a7e9
(frame-update-faces): New function.
author | Richard M. Stallman <rms@gnu.org> |
---|---|
date | Fri, 22 Apr 1994 08:47:42 +0000 |
parents | aa83a7152b11 |
children | c7525f1cfaba |
files | lisp/faces.el |
diffstat | 1 files changed, 19 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/lisp/faces.el Fri Apr 22 07:30:30 1994 +0000 +++ b/lisp/faces.el Fri Apr 22 08:47:42 1994 +0000 @@ -830,6 +830,25 @@ (modify-frame-parameters frame (list visibility-spec))) frame))) +;; Update a frame's faces when we change its default font. +(defun frame-update-faces (frame) + (let* ((faces global-face-data) + (rest faces)) + (while rest + (let* ((face (car (car rest))) + (font (face-font face t))) + (if (listp font) + (let ((bold (memq 'bold font)) + (italic (memq 'italic font))) + (cond ((and bold italic) + (make-face-bold-italic face frame t)) + (bold + (make-face-bold face frame t)) + (italic + (make-face-italic face frame t))))) + (setq rest (cdr rest))) + frame))) + ;; Fill in the face FACE from frame-independent face data DATA. ;; DATA should be the non-frame-specific ("global") face vector ;; for the face. FACE should be a face name or face object.