unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Tim Cross <theophilusx@gmail.com>
To: Lennart Borgman <lennart.borgman@gmail.com>
Cc: Chong Yidong <cyd@stupidchicken.com>, emacs-devel@gnu.org
Subject: Re: Eliminating a couple of independent face definitions
Date: Wed, 2 Feb 2011 16:02:00 +1100	[thread overview]
Message-ID: <AANLkTimj5V3m7cHS==AYkmdF=FK=cbzxkPHr1V_=J=pq@mail.gmail.com> (raw)
In-Reply-To: <AANLkTim97Km_ELHG5KNHW1sX84p=5X1xd7JVS6bv0U8i@mail.gmail.com>

[-- Attachment #1: Type: text/plain, Size: 2949 bytes --]

On Wed, Feb 2, 2011 at 3:11 PM, Lennart Borgman
<lennart.borgman@gmail.com>wrote:

> On Wed, Feb 2, 2011 at 5:05 AM, Chong Yidong <cyd@stupidchicken.com>
> wrote:
> > It would be nice if almost all faces in packaged included with Emacs
> > inherit from the basic or font-lock faces.  Most faces already do this.
> > This way, users don't have to specify as much when they write a Custom
> > theme or their own personal face customizations.
> >
> > I'd like to inherit-ize most of the remaining faces that don't already
> > do this.  For instance, compilation-warning is currently "Orange", and
> > compilation-info is "Green3"; I want to make them inherit from
> > font-lock-doc-face and font-lock comment-face respectively.  (The rest
> > of the compilation-mode already inherit from font-lock faces.)
> >
> > There are a few more similar changes here and there.  Any objection?
>
> Yes.
>
> It is really good to try to merge some faces, but the specific merges
> you mentioned seems a bit unfortunate. The colors were obviously
> chosen to fit into those used in society for "ok" and "warning". Why
> not create new faces for such things? (I do not think the font-lock
> faces have the same meaning tighed to them, but maybe I am wrong
> there.)
>
> I think the concept of using inherited faces so that all packages inherit
from a few well designed faces i.e. have appropriate definitions for
light/dark backgrounds, work on the console, in a terminal, under X, on
windows etc, is a good one. Having a few base faces to maintain in this way
would seem like a positive move and I agree it would make defining custom
themes easier. In fact, Ive recently been doing exactly this for VM
primarily because I thought it was better to use 'core' faces in that
package as they were more likely to be defined based on sound reasoning,
testing and feedback and would more likely be acceptable to a larger number
of users.

My only concern is how you define what to inherit from. For example, in your
suggestion of compiler warnings inheriting form  font-lock-comment-face I
immediately wondered why you would not inherit from font-lock-warning face?
It isn't clear to me what rationale would guide the decision as to what base
face to  inherit from. Without this, the choices could become rather
arbitrary and could make face customization or theme definition
even more difficult, resulting in apparently arbitrary use of font lock
properties (which may be OK, I don't know).

It would probably be sufficient to have a clear guideline or set of
recommendations which could be applied by developers when deciding on what
face to inherit from. However, this probably needs to be done prior to
changing definitions to use inherit. I would not expect to get it right or
even get consensus on the first go, but it could be refined and improved.
Developers may also be more likely to use :inherit if they feel there is
some guidance on what to inherit from.

Tim

[-- Attachment #2: Type: text/html, Size: 3542 bytes --]

  reply	other threads:[~2011-02-02  5:02 UTC|newest]

Thread overview: 43+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-02-02  4:05 Eliminating a couple of independent face definitions Chong Yidong
2011-02-02  4:11 ` Lennart Borgman
2011-02-02  5:02   ` Tim Cross [this message]
2011-02-02 15:15     ` Drew Adams
2011-02-02 17:17     ` Chong Yidong
2011-02-02 20:33       ` Philipp Haselwarter
2011-02-02 23:01         ` Lennart Borgman
2011-02-03 19:10         ` Drew Adams
2011-02-04  0:12           ` Tim Cross
2011-02-05 22:11             ` Drew Adams
2011-02-07  0:59               ` Drew Adams
2011-02-07  1:30                 ` Tim Cross
2011-02-07 14:09                   ` Drew Adams
2011-02-07 21:14                     ` Tim Cross
2011-02-07 22:12                       ` Drew Adams
2011-02-08  3:51                         ` Tim Cross
2011-02-08 15:26                           ` Drew Adams
2011-02-08 19:10                             ` Philipp Haselwarter
2011-02-08 13:58                 ` Davis Herring
2011-02-08 14:33                   ` Drew Adams
2011-02-08 15:34                     ` Davis Herring
2011-02-08 16:16                       ` Drew Adams
2011-02-08 17:40                         ` Lennart Borgman
2011-02-08 19:10                         ` Davis Herring
2011-02-07  1:08               ` Tim Cross
2011-02-04  0:18           ` Stephen J. Turnbull
2011-02-04  3:55             ` John Yates
2011-02-04  4:56               ` Stephen J. Turnbull
2011-02-04  4:57             ` Jambunathan K
2011-02-05 22:09             ` Drew Adams
2011-02-06  7:11               ` Stephen J. Turnbull
2011-02-04 10:26           ` Julien Danjou
2011-02-04 17:57             ` color-complement for defface (was: Eliminating a couple of independent face definitions) Ted Zlatanov
2011-02-14 18:11               ` color-complement for defface Ted Zlatanov
2011-02-20 17:44                 ` Julien Danjou
2011-03-10 19:09                   ` Ted Zlatanov
2011-03-10 19:11                     ` Ted Zlatanov
2011-02-02 21:24       ` Eliminating a couple of independent face definitions Tim Cross
2011-02-03 16:14       ` Dan Nicolaescu
2011-02-02 17:16   ` Chong Yidong
2011-02-02  9:58 ` Štěpán Němec
2011-02-02 17:05   ` Chong Yidong
2011-02-02 10:05 ` Julien Danjou

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

  List information: https://www.gnu.org/software/emacs/

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

  git send-email \
    --in-reply-to='AANLkTimj5V3m7cHS==AYkmdF=FK=cbzxkPHr1V_=J=pq@mail.gmail.com' \
    --to=theophilusx@gmail.com \
    --cc=cyd@stupidchicken.com \
    --cc=emacs-devel@gnu.org \
    --cc=lennart.borgman@gmail.com \
    /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 public inbox

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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).