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

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

bug#35076: [26.1] delete-face [FEATURE REQUEST]


From: Drew Adams
Subject: bug#35076: [26.1] delete-face [FEATURE REQUEST]
Date: Tue, 2 Apr 2019 08:03:56 -0700 (PDT)

> > I don't see any command or recommended method for deleting a face. Is
> > there one? Shouldn't there either be one, or a discussion about it in
> > the documentation?
> 
> Maybe I'm missing something, but why would we need such a method?
> What would be a practical use case where it's necessary to delete a
> face (as opposed to simply leaving it alone and not using it)?
> 
> I'm asking because implementing this will not be trivial, what with
> all the places where faces are recorded and cached, so we'd need a
> good reason to do that.  OTOH, Emacs already knows how to replace a
> face when it is redefined, so it isn't like we waste memory here.

I almost posted the same question.  On reflection I
thought that it can be helpful to users (and programs)
not to have to have such "extra", unwanted, unused
faces laying about, remaining in a session.

How so?  Mainly UI considerations.  Useless choices for
`M-x customize face' and other uses of `read-face-*'.
Less noise in the output of `list-faces-display'.

If there are enough such dead-weight faces then it also
might affect performance slightly, depending on the use,
but this isn't what I'd worry about.

I can't speak for the OP, but the nuisance of having
such faces linger as UI noise is one reason, I think

Yes, users can redefine a face to just inherit from
`default', but the above considerations still apply.

I think it would be good if users could delete faces,
just like they undefine or unbind keys or unintern
symbols.  How costly it might be to implement this
feature is an counter consideration.





reply via email to

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