all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Drew Adams <drew.adams@oracle.com>
To: Eli Zaretskii <eliz@gnu.org>, Boruch Baum <boruch_baum@gmx.com>
Cc: 35076@debbugs.gnu.org
Subject: bug#35076: [26.1] delete-face [FEATURE REQUEST]
Date: Tue, 2 Apr 2019 08:03:56 -0700 (PDT)	[thread overview]
Message-ID: <9a27e857-1408-4b17-9b6e-a461c349aad0@default> (raw)
In-Reply-To: <<8336n0h3yp.fsf@gnu.org>>

> > 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	other threads:[~2019-04-02 15:03 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <<20190402000403.rb3cb4b6tzqys4vy@E15-2016.optimum.net>
     [not found] ` <<8336n0h3yp.fsf@gnu.org>
2019-04-02 15:03   ` Drew Adams [this message]
2019-04-02  0:04 bug#35076: [26.1] delete-face [FEATURE REQUEST] Boruch Baum
2019-04-02  0:15 ` Basil L. Contovounesios
2019-04-02  0:38   ` Boruch Baum
2019-04-02 15:10     ` Eli Zaretskii
2019-04-02 14:33 ` Eli Zaretskii
2020-08-21  2:09   ` Stefan Kangas
2020-08-21  3:35     ` Boruch Baum
2020-08-21  6:33       ` Eli Zaretskii
2020-08-21  8:17         ` Boruch Baum

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=9a27e857-1408-4b17-9b6e-a461c349aad0@default \
    --to=drew.adams@oracle.com \
    --cc=35076@debbugs.gnu.org \
    --cc=boruch_baum@gmx.com \
    --cc=eliz@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.