aboutsummaryrefslogtreecommitdiffstats
path: root/lisp/mouse.el
diff options
context:
space:
mode:
authorRichard M. Stallman <[email protected]>1993-11-27 07:52:19 +0000
committerRichard M. Stallman <[email protected]>1993-11-27 07:52:19 +0000
commit852bc46fcb530010b83d4918c3e275d01ca585ab (patch)
tree5b6ceb09b6d1d29548f108cc368006882fb45ab6 /lisp/mouse.el
parent86fb06ae8e42ef47ebd0657c6334358474e64a10 (diff)
(mouse-set-font): Update nonstandard faces that are supposed
to use a modification of the frame's font.
Diffstat (limited to 'lisp/mouse.el')
-rw-r--r--lisp/mouse.el19
1 files changed, 18 insertions, 1 deletions
diff --git a/lisp/mouse.el b/lisp/mouse.el
index 7c6648df30..5139086bb4 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.