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

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

RE: problems with face-spec-reset-face and set-face-attribute


From: Drew Adams
Subject: RE: problems with face-spec-reset-face and set-face-attribute
Date: Sun, 17 Jul 2005 21:09:06 -0700

    > 2. The doc string of set-face-attribute does not agree with that of
    >    internal-set-lisp-face-attribute, which does its work. The former
    >    says that FRAME=nil means change on all frames, but does not
    >    mention that it also changes the default. In fact, it says that t
    >    does that (which it doesn't). The doc string of
    >    `internal-set-lisp-face-attribute' seems correct.

    I think you misunderstood the doc string and/or the code.

That's possible. The explanation is not clear.

    When the doc says FRAME nil changes the attribute on all frames, it
    doesn't have to say it includes the default, since ``all'' means just
    that: all, including old, existing frames, and new, as yet to be
    created.

Why doesn't it have to? "All" more often means "all that exist" than "all
that exist or will exist going forward". You are reading things into the
text that are not there, I think. "All people in the White House are weird"
does not speak for the future; it speaks only for now.

The doc string for internal-set* is very clear. The (more commonly accessed)
doc string for set-face-attribute should be at least as clear.

    (Of course, I won't object to saying that explicitly,
    although the doc string is already very-very long.)

It can be shorter and clearer. Currently it is long and misleading.

The doc string also says, for t, that it "means change
the default for new frames (this is done automatically each time an
attribute is changed on all frames)." The parenthetical remark is not clear
to me, but it seems to be saying that a value of nil should also change the
default. That's great, but that should be said in the part about nil (see
above), not in the part about t.

    (If you actually tried set-face-attribute, then perhaps your testing was
    incorrect; otherwise, please try it.)

Yes, I actually did try it. And I actually just retried it. Did you actually
try it? If you don't see this behavior, perhaps you are trying on a
different platform or with a different version? Here is my recipe:

emacs -q
(setq pop-up-frames t)
M-x list-faces-display
Click mouse-2 on completions-first-difference. It shows Inherit: bold.
M-: (set-face-attribute 'completions-first-difference nil :inherit
'unspecified)
C-x 5 f whatever (create a new frame)
M-x list-faces-display (from the new frame)
Click mouse-2 on completions-first-difference. It shows "Inherit: bold" (the
original value).

However, doing list-faces-display from the same buffer where you did
`set-face-attribute', and clicking completions-first-difference, shows
"Inherit: unspecified".

    If FRAME is t, then set-face-attribute _does_ set the attribute for
    new frames.  If it doesn't for you, please post a complete test case
    to reproduce that bug.

Same test as above, with t instead of nil. The only difference is that the
value is not changed for any existing frames (which is normal). In both
cases, new frames do not have the `unspecified' value for the face's
:inherit property - they still have value `bold'.

HTH,

  Drew






reply via email to

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