emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] emacs/lisp menu-bar.el


From: Chong Yidong
Subject: [Emacs-diffs] emacs/lisp menu-bar.el
Date: Fri, 27 Feb 2009 15:13:07 +0000

CVSROOT:        /sources/emacs
Module name:    emacs
Changes by:     Chong Yidong <cyd>      09/02/27 15:13:07

Modified files:
        lisp           : menu-bar.el 

Log message:
        (menu-set-font): Fix last fix.

CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/emacs/lisp/menu-bar.el?cvsroot=emacs&r1=1.351&r2=1.352

Patches:
Index: menu-bar.el
===================================================================
RCS file: /sources/emacs/emacs/lisp/menu-bar.el,v
retrieving revision 1.351
retrieving revision 1.352
diff -u -b -r1.351 -r1.352
--- menu-bar.el 27 Feb 2009 00:04:59 -0000      1.351
+++ menu-bar.el 27 Feb 2009 15:13:07 -0000      1.352
@@ -637,16 +637,14 @@
                (mouse-select-font)))
        spec)
     (when font
-      ;; We used to call set-face-attribute with a nil argument here,
-      ;; but this does the wrong thing (Bug#2476).  The reason is
-      ;; subtle: when Emacs looks for a font matching the `font'
-      ;; argument, it tries to guess the best matching font by
-      ;; examining the other face attributes.  The attributes for
-      ;; future frames are generally unspecified, so this matching
-      ;; process works poorly.  What we do instead is assign `font' to
-      ;; the selected frame, then use that font object and assign it
-      ;; to all other frames (and to future frames).
-      (set-face-attribute 'default (selected-frame) :font font)
+      ;; Be careful here: when set-face-attribute is called for the
+      ;; :font attribute, Emacs tries to guess the best matching font
+      ;; by examining the other face attributes (Bug#2476).
+      (set-face-attribute 'default (selected-frame)
+                         :width 'normal
+                         :weight 'normal
+                         :slant 'normal
+                         :font font)
       (let ((font-object (face-attribute 'default :font)))
        (dolist (f (frame-list))
          (and (not (eq f (selected-frame)))




reply via email to

[Prev in Thread] Current Thread [Next in Thread]