summaryrefslogtreecommitdiff
path: root/lisp
diff options
context:
space:
mode:
authorRichard M. Stallman <rms@gnu.org>1994-04-22 08:47:42 +0000
committerRichard M. Stallman <rms@gnu.org>1994-04-22 08:47:42 +0000
commit9d52c8d3696e4adb18e93d2a1c81b456504ab44f (patch)
tree2148d428c906c28348e1b359236336495deba129 /lisp
parentb545f35b46e3d18da31fe394a4911b1a418cff40 (diff)
downloademacs-9d52c8d3696e4adb18e93d2a1c81b456504ab44f.tar.gz
(frame-update-faces): New function.
Diffstat (limited to 'lisp')
-rw-r--r--lisp/faces.el19
1 files changed, 19 insertions, 0 deletions
diff --git a/lisp/faces.el b/lisp/faces.el
index 06f3c4bdc3e..bb506e6812a 100644
--- a/lisp/faces.el
+++ b/lisp/faces.el
@@ -830,6 +830,25 @@ selected frame."
(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.