Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Open sidebar
emacs
emacs
Commits
431709cb
Commit
431709cb
authored
Feb 27, 2009
by
Chong Yidong
Browse files
(menu-set-font): Assign the same font object to all frames (Bug#2476).
parent
a582c49d
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
16 additions
and
1 deletion
+16
-1
lisp/menu-bar.el
lisp/menu-bar.el
+16
-1
No files found.
lisp/menu-bar.el
View file @
431709cb
...
...
@@ -637,7 +637,22 @@ by \"Save Options\" in Custom buffers.")
(
mouse-select-font
)))
spec
)
(
when
font
(
set-face-attribute
'default
nil
:font
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
)
(
let
((
font-object
(
face-attribute
'default
:font
)))
(
dolist
(
f
(
frame-list
))
(
and
(
not
(
eq
f
(
selected-frame
)))
(
display-graphic-p
f
)
(
set-face-attribute
'default
f
:font
font-object
)))
(
set-face-attribute
'default
t
:font
font-object
))
(
setq
spec
(
list
(
list
t
(
face-attr-construct
'default
))))
(
put
'default
'customized-face
spec
)
(
custom-push-theme
'theme-face
'default
'user
'set
spec
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment