From 852bc46fcb530010b83d4918c3e275d01ca585ab Mon Sep 17 00:00:00 2001 From: "Richard M. Stallman" Date: Sat, 27 Nov 1993 07:52:19 +0000 Subject: [PATCH] (mouse-set-font): Update nonstandard faces that are supposed to use a modification of the frame's font. --- lisp/mouse.el | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-) diff --git a/lisp/mouse.el b/lisp/mouse.el index 7c6648df302..5139086bb47 100644 --- a/lisp/mouse.el +++ b/lisp/mouse.el @@ -1279,7 +1279,24 @@ and selects that window." (set-face-font 'italic nil (selected-frame)) (make-face-italic 'italic (selected-frame) t) (set-face-font 'bold-italic nil (selected-frame)) - (make-face-bold-italic 'bold-italic (selected-frame) t)))) + (make-face-bold-italic 'bold-italic (selected-frame) t) + ;; Update any nonstandard faces whose definition is + ;; "a bold/italic/bold&italic version of the frame's font". + (let ((rest global-face-data)) + (while rest + (condition-case nil + (if (listp (face-font (cdr (car rest)))) + (let ((bold (memq 'bold (face-font (cdr (car rest))))) + (italic (memq 'italic (face-font (cdr (car rest)))))) + (if (and bold italic) + (make-face-bold-italic (car (car rest)) (selected-frame)) + (if bold + (make-face-bold (car (car rest)) (selected-frame)) + (if italic + (make-face-italic (car (car rest)) (selected-frame))))))) + (error nil)) + (setq rest (cdr rest)))) + ))) ;;; Bindings for mouse commands. -- 2.39.5