# HG changeset patch # User Richard M. Stallman # Date 767004462 0 # Node ID 74edb669a7e9b9b8547495cf7e07af6decb36ec1 # Parent aa83a7152b1196b24ef33f985da89ac47d9c4dd5 (frame-update-faces): New function. diff -r aa83a7152b11 -r 74edb669a7e9 lisp/faces.el --- 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.