mirror of
git://git.sv.gnu.org/emacs.git
synced 2026-04-27 16:51:06 -07:00
(menu-set-font): Fix last fix.
This commit is contained in:
parent
4420f48b12
commit
bb712f9058
1 changed files with 8 additions and 10 deletions
|
|
@ -637,16 +637,14 @@ by \"Save Options\" in Custom buffers.")
|
|||
(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)))
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue