emacs-pretest-bug
[Top][All Lists]
Advanced

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

Re: Setting face-font in Carbon Emacs 21.3.50.1


From: Stefan Monnier
Subject: Re: Setting face-font in Carbon Emacs 21.3.50.1
Date: Mon, 07 Mar 2005 08:59:59 -0500
User-agent: Gnus/5.11 (Gnus v5.11) Emacs/22.0.50 (gnu/linux)

>> Also, looking at the code of set-face-font, it doesn't do aything else than
>> call (set-face-attribute face frame :font font), so I doubt it will give
>> much better results.

> Well what I mean to say was you shouldn't call "set-frame-attribute
> :font" either. :-)

It's often convenient to set :font for the default font since the font name
often comes from outside Emacs (the user knows he likes font
"-blabla-foo-120-10-*-*" on his screen because he used it for other
applications or he chose it in a font selector).

I don't think we should discourage people from doing it especially in this
particular circumstance, and I think it's important for Emacs to support it
well (e.g. make sure that if you set the default font to
"-blabla-foo-120-10-*-*", Emacs indeed will use "-blabla-foo-120-10-*-*"
and not some other.  Given how Emacs decomposes this into its own info to
later reconstruct it, it's not obvious at all that it works correctly, and
there's been problems with it in the past).

>> Also the docstring of set-face-font says that a nil
>> `frame' argument makes it apply to all frames, which I'd understand as
>> including future frames as well.

> The code does "future frames" for t, "current frames" for nil, and
> "future + current frames" for `0'.

The docstring of set-face-attribute says

   FRAME nil means change attributes on all frames.  FRAME t means change
   the default for new frames (this is done automatically each time an
   attribute is changed on all frames).

so nil should also change future frames.  And if not, it should be changed
because I really can't think of a situation where it makes sense to change
the attribute on all current frames and not on the future ones (and if
that's really what you want, than a (dolist (frame (frame-list)) ...) will
do what you want in a much clearer way).


        Stefan




reply via email to

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