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: Thu, 13 Oct 2005 22:39:26 -0700

        Then I'm confused. As Juri said (and it works):

        `unspecified' does just what it says, i.e. leaves the default frame
        value untouched.  If you want to change the default for new frames,
        you can set the value of this attribute to nil.  So this should work
        just fine:

            (set-face-attribute 'completions-first-difference nil :inherit nil)

    I don't think that is how things are designed to work.
    I don't know what he meant by it, so I don't see a reason
    to argue about the hermeneutics.

1. Juri's suggestion for changing the default value (or, rather, removing
it, via nil) for future frames works. Whether it should work or not, I don't
know.

2. I still see a bug. I think it is in the behavior of set-face-attribute
wrt only the :inherit attribute (which is what Eli said), but it may be a
bug in set-face-attribute's doc string, as well as that of
internal-set-lisp-face-attribute.

set-face-attribute's doc string says that values of nil and t for the FRAME
argument will change the default value for the attribute for new frames.
Similarly, for internal-set-lisp-face-attribute. This does not seem to be
the case for attribute :inherit - the default value is not changed for new
frames, unless you set it to nil. In particular, supplying a value of
`unspecified' has no effect on future frames.

Whether the default value for new frames _should_ be changed by these
functions I don't know, but their doc strings say it should, and they make
no exception for attribute :inherit, and they say nothing about it only
working for the attribute value (or non-value or pseudo-value or whatever)
nil.

IOW, from their doc strings, I expect a nil or t value for FRAME to change
the default value of the attribute (_any attribute) to the value supplied
(_any_ value). And I don't see that expected behavior. Either the behavior
is wrong, or the doc string is wrong, or my understanding of the doc string
or behavior is wrong.







reply via email to

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