aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRichard M. Stallman1994-04-22 08:47:42 +0000
committerRichard M. Stallman1994-04-22 08:47:42 +0000
commit9d52c8d3696e4adb18e93d2a1c81b456504ab44f (patch)
tree2148d428c906c28348e1b359236336495deba129
parentb545f35b46e3d18da31fe394a4911b1a418cff40 (diff)
downloademacs-9d52c8d3696e4adb18e93d2a1c81b456504ab44f.tar.gz
emacs-9d52c8d3696e4adb18e93d2a1c81b456504ab44f.zip
(frame-update-faces): New function.
-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."
830 (modify-frame-parameters frame (list visibility-spec))) 830 (modify-frame-parameters frame (list visibility-spec)))
831 frame))) 831 frame)))
832 832
833;; Update a frame's faces when we change its default font.
834(defun frame-update-faces (frame)
835 (let* ((faces global-face-data)
836 (rest faces))
837 (while rest
838 (let* ((face (car (car rest)))
839 (font (face-font face t)))
840 (if (listp font)
841 (let ((bold (memq 'bold font))
842 (italic (memq 'italic font)))
843 (cond ((and bold italic)
844 (make-face-bold-italic face frame t))
845 (bold
846 (make-face-bold face frame t))
847 (italic
848 (make-face-italic face frame t)))))
849 (setq rest (cdr rest)))
850 frame)))
851
833;; Fill in the face FACE from frame-independent face data DATA. 852;; Fill in the face FACE from frame-independent face data DATA.
834;; DATA should be the non-frame-specific ("global") face vector 853;; DATA should be the non-frame-specific ("global") face vector
835;; for the face. FACE should be a face name or face object. 854;; for the face. FACE should be a face name or face object.