unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: "Stefan Monnier" <monnier+gnu/emacs@RUM.cs.yale.edu>
Cc: monnier+gnu/emacs@RUM.cs.yale.edu, eliz@is.elta.co.il,
	emacs-devel@gnu.org
Subject: Re: mode-line-inactive and face inheritance
Date: Tue, 19 Feb 2002 17:53:27 -0500	[thread overview]
Message-ID: <200202192253.g1JMrRt18194@rum.cs.yale.edu> (raw)
In-Reply-To: 200202192130.g1JLU5s13034@aztec.santafe.edu

>     More specifically, it adds an `all' entry which (just like `t')
>     always matches but doesn't prevent subsequent specs from being
>     considered.
> That seems useful.  `common' might be clearer than `all'.

Actually, I think we can just reuse t instead of `all' or `common'.
Currently t can only be meaningfully used for the last entry,
so we can simply extend its meaning a little bit in a backward
compatible way.

> 		 Also it allows nesting of display-specific specs
>     so you can extract the common part of the `light' and `'dark'
>     settings for `color' displays.
> 
> That seems too complex; I think I would not want to document this
> even if it worked.

I'm ambivalent about it.  I think it could also make things simpler.
Currently defface accepts a SPEC of the form:

	SPEC     ::= (CONDSPEC CONDSPEC ...)
	CONDSPEC ::= (COND PROPS)
	           | (COND PROP PROP ...)

Where (COND PROPS) is an obsolete form kept for backward compatibility only.
The code I posted changes it to

	SPEC     ::= (CONDSPEC CONDSPEC ...)
	CONDSPEC ::= (COND PROPS)
	           | (COND PROP PROP ...)
	           | (COND CONDSPEC CONDSPEC ...)

But an alternative way to get a similar result would be to use

	SPEC     ::= (CONDSPEC CONDSPEC ...)
	           | (PROP PROP ...)
	CONDSPEC ::= (COND PROPS)
	           | (COND . SPEC)

which has the advantage that a simple defface that has no conditional
part could now be written as

	(defface font-lock-doc-face
	  '(:inherit font-lock-string-face)
	  "Font Lock mode face used to highlight documentation."
	  :group 'font-lock-highlighting-faces)

instead of

	(defface font-lock-doc-face
	  '((t :inherit font-lock-string-face))
	  "Font Lock mode face used to highlight documentation."
	  :group 'font-lock-highlighting-faces)


-- Stefan


_______________________________________________
Emacs-devel mailing list
Emacs-devel@gnu.org
http://mail.gnu.org/mailman/listinfo/emacs-devel


  reply	other threads:[~2002-02-19 22:53 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-02-16  7:55 mode-line-inactive and face inheritance Eli Zaretskii
2002-02-16 21:49 ` Kim F. Storm
2002-02-17 16:48 ` Richard Stallman
2002-02-17 18:24   ` Eli Zaretskii
2002-02-18 15:24 ` Stefan Monnier
2002-02-18 19:44   ` Kim F. Storm
2002-02-18 22:08     ` Stefan Monnier
2002-02-19 21:30   ` Richard Stallman
2002-02-19 22:53     ` Stefan Monnier [this message]
2002-02-22  4:31       ` Richard Stallman
2002-02-22 16:07         ` Stefan Monnier
2002-02-23  5:26           ` Richard Stallman

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=200202192253.g1JMrRt18194@rum.cs.yale.edu \
    --to=monnier+gnu/emacs@rum.cs.yale.edu \
    --cc=eliz@is.elta.co.il \
    --cc=emacs-devel@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 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).