emacs-devel
[Top][All Lists]
Advanced

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

RE: Eliminating a couple of independent face definitions


From: Drew Adams
Subject: RE: Eliminating a couple of independent face definitions
Date: Wed, 2 Feb 2011 07:15:39 -0800

I cannot really voice an objection.  I'd just point out that inheriting means
coupling (dependence).  The upside is of course the same as the downside: change
an ancestor and you change the descendents.  That might be what you want
sometimes, and it might not be what you want sometimes.  (Of course, inheritance
can be overridden/broken.)

FWIW, in my own use of faces I tend not to inherit too much.  Faces have
particular uses (contexts), and it is not that common that the use/purpose is
similar enough that inheritance is called for (in my usage, at least).

And I disagree with the general tendency here to avoid defining new faces (aka
the tendency to reuse faces defined for a different purpose).  Having two
different faces, even with the same attribute values, designed for two different
uses/purposes, makes sense in general.  It is not a great idea, in general, to
reuse a face just because you want the same color etc.

Similarly, I've disagreed with the practice of hard-coding `highlight' as the
`mouse-face' property (throughout the code).  In general, we should use either a
face variable or a new face for each such use, so that users can change the
behavior/appearance in different contexts (without redefining the hard-coded
code).




reply via email to

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