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, 9 Oct 2005 15:16:41 -0700

Sorry to ping on this, but I can't tell by checking the latest sources if
this bug ever got fixed (and I don't have a binary Windows version to test).

I'm specifically interested in the status of the original problem I
reported:

    3. face-spec-reset-face (so, also, set-face-attribute) does not work
       correctly for :inherit. If FRAME = nil, it seems to set the
       property to `unspecified' only for the current frame.. It does not
       change it for all frames, and it does not change the default (for
       new frames). There is thus no way to get rid of an existing
       :inherit, replacing it with `unspecified'.

Here, again, is the recipe to reproduce the bug:

    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".

As Eli noted:

    This seems to be a bug in internal-set-lisp-face-attribute that is
    specific to the :inherit attribute.

IOW, it is only attribute :inherit that is a problem - other attributes are
OK. But :inherit is perhaps the most important attribute to be able to reset
(with face-spec-reset-face). The example given is a typical one, I think:
trying to remove the faces imposed by default in the *Completions* buffer:

  (face-spec-reset-face  'completions-common-part)
  (face-spec-reset-face  'completions-first-difference)

Thanks,

  Drew

    -----Original Message-----
    From: Drew Adams [mailto:address@hidden
    Sent: Wednesday, July 20, 2005 4:25 PM
    To: address@hidden
    Subject: RE: problems with face-spec-reset-face and set-face-attribute

        This seems to be a bug in internal-set-lisp-face-attribute that is
        specific to the :inherit attribute.  When I try your recipe
        with other
        attributes, like :foreground or :slant, everything works as
        expected.
        (A good face to try this is `fringe': when it changes, you see the
        effect immediately.)

    Right; I believe it's only :inherit that's a problem.

        > 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'.

        Likewise: try with something other than :inherit, it works as
        advertised.

    Yes.

        I'll look into the problem with :inherit when I have time, unless
        someone beats me to it.

    Thanks. - Drew






reply via email to

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