aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChong Yidong2009-02-27 15:13:07 +0000
committerChong Yidong2009-02-27 15:13:07 +0000
commitbb712f90580008ed91981b6258894cd69ed1acf9 (patch)
tree2a5d7d70e4a27f4fe6316f95bb7b8d32cfbeb79a
parent4420f48b12fa20f64680389acd62eda6dc0dcdca (diff)
downloademacs-bb712f90580008ed91981b6258894cd69ed1acf9.tar.gz
emacs-bb712f90580008ed91981b6258894cd69ed1acf9.zip
(menu-set-font): Fix last fix.
-rw-r--r--lisp/menu-bar.el18
1 files changed, 8 insertions, 10 deletions
diff --git a/lisp/menu-bar.el b/lisp/menu-bar.el
index 043e0120fc9..5b3b5674f3e 100644
--- a/lisp/menu-bar.el
+++ b/lisp/menu-bar.el
@@ -637,16 +637,14 @@ by \"Save Options\" in Custom buffers.")
637 (mouse-select-font))) 637 (mouse-select-font)))
638 spec) 638 spec)
639 (when font 639 (when font
640 ;; We used to call set-face-attribute with a nil argument here, 640 ;; Be careful here: when set-face-attribute is called for the
641 ;; but this does the wrong thing (Bug#2476). The reason is 641 ;; :font attribute, Emacs tries to guess the best matching font
642 ;; subtle: when Emacs looks for a font matching the `font' 642 ;; by examining the other face attributes (Bug#2476).
643 ;; argument, it tries to guess the best matching font by 643 (set-face-attribute 'default (selected-frame)
644 ;; examining the other face attributes. The attributes for 644 :width 'normal
645 ;; future frames are generally unspecified, so this matching 645 :weight 'normal
646 ;; process works poorly. What we do instead is assign `font' to 646 :slant 'normal
647 ;; the selected frame, then use that font object and assign it 647 :font font)
648 ;; to all other frames (and to future frames).
649 (set-face-attribute 'default (selected-frame) :font font)
650 (let ((font-object (face-attribute 'default :font))) 648 (let ((font-object (face-attribute 'default :font)))
651 (dolist (f (frame-list)) 649 (dolist (f (frame-list))
652 (and (not (eq f (selected-frame))) 650 (and (not (eq f (selected-frame)))