From: Oliver Scholz <alkibiades@gmx.de>
Subject: Re: Background colors in font-lock-keywords
Date: Wed, 28 May 2003 18:13:01 +0200 [thread overview]
Message-ID: <ur86jxd6a.fsf@ID-87814.user.dfncis.de> (raw)
In-Reply-To: ?fnord?87fzmzyzyg.fsf@ID-97657.usr.dfncis.de
lawrence mitchell <wence@gmx.li> writes:
> Oliver Scholz wrote:
>
> [...] PREPEND versus APPEND in font-lock-keywords.
>
>> Erm, this code was just example code, so I am personally not so sure
>> which one should take precedence, the old fontification or the new
>> one. It's hard for me to make an educated guess, because the major
>> mode has no meaning, and so the fontification has no meaning.
>
>> But maybe you have a more general reason to say this. Could you
>> please elaborate?
>
> The way I read it, if using `append', rather than `prepend',
> in the example above, EXAMPLE-L-WORD-FACE would change the
> background iff FONT-LOCK-WARNING-FACE and
> FONT-LOCK-KEYWORD-FACE, did not set the background colour.
> Certainly in my Emacs setup, said faces have had their
> backgrounds set explicitly.
[...]
That's true; this is what the "precedence" is about. However, if a
user sets the background colour of `font-lock-warning-face'
etc. explicitely, she probably attaches some intensional significance
with it. Maybe the background colour even is the only face attribute
of `font-lock-warning-face' in her configuration?
Whether it is a bug or a feature to override this or to not override
this, depends entirely on what is more important. Is it more important
to highlight "lirum" and "larum" as special words or is it more
important to highlight words beginning with "l"? Maybe it's nice but
not necessary to highlight "lambda" and "lalala", but "lirum" and
"larum" are *the* important keywords to watch out for? In this case it
is a bug to highlight "lirum" and "larum" as `words beginning with l'.
I have no idea what is the proper thing to do for `example-mode'. And
I am the author of it. :-|
Oliver
--
9 Prairial an 211 de la Révolution
Liberté, Egalité, Fraternité!
prev parent reply other threads:[~2003-05-28 16:13 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2003-05-27 11:53 Background colors in font-lock-keywords Jesse Sheidlower
2003-05-27 14:35 ` Stefan Monnier
2003-05-28 16:09 ` Jesse Sheidlower
2003-05-27 16:30 ` Kevin Rodgers
2003-05-27 17:12 ` Jesse Sheidlower
2003-05-27 22:23 ` Oliver Scholz
2003-05-27 22:43 ` Oliver Scholz
2003-05-28 0:13 ` lawrence mitchell
2003-05-28 7:32 ` Oliver Scholz
2003-05-28 13:15 ` lawrence mitchell
2003-05-28 16:13 ` Oliver Scholz [this message]
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=ur86jxd6a.fsf@ID-87814.user.dfncis.de \
--to=alkibiades@gmx.de \
/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.
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).