From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: Oliver Scholz Newsgroups: gmane.emacs.help Subject: Re: Background colors in font-lock-keywords Date: Wed, 28 May 2003 18:13:01 +0200 Sender: help-gnu-emacs-bounces+gnu-help-gnu-emacs=m.gmane.org@gnu.org Message-ID: References: NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Trace: main.gmane.org 1054139245 24651 80.91.224.249 (28 May 2003 16:27:25 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Wed, 28 May 2003 16:27:25 +0000 (UTC) Original-X-From: help-gnu-emacs-bounces+gnu-help-gnu-emacs=m.gmane.org@gnu.org Wed May 28 18:27:16 2003 Return-path: Original-Received: from monty-python.gnu.org ([199.232.76.173]) by main.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 19L3aX-0005Gh-00 for ; Wed, 28 May 2003 18:15:41 +0200 Original-Received: from localhost ([127.0.0.1] helo=monty-python.gnu.org) by monty-python.gnu.org with esmtp (Exim 4.20) id 19L3aU-00086i-04 for gnu-help-gnu-emacs@m.gmane.org; Wed, 28 May 2003 12:15:38 -0400 Original-Path: shelby.stanford.edu!newsfeed.stanford.edu!headwall.stanford.edu!fu-berlin.de!uni-berlin.de!dialin-145-254-191-054.arcor-ip.NET!not-for-mail Original-Newsgroups: gnu.emacs.help Original-Lines: 43 Original-NNTP-Posting-Host: dialin-145-254-191-054.arcor-ip.net (145.254.191.54) Original-X-Trace: fu-berlin.de 1054138402 5492057 145.254.191.54 (16 [87814]) X-Attribution: os X-Face: "HgH2sgK|bfH$; PiOJI6|qUCf.ve<51_Od(%ynHr?=>znn#~#oS>",F%B8&\vus),2AsPYb -n>PgddtGEn}s7kH?7kH{P_~vu?]OvVN^qD(L)>G^gDCl(U9n{:d>'DkilN!_K"eNzjrtI4Ya6;Td% IZGMbJ{lawG+'J>QXPZD&TwWU@^~A}f^zAb[Ru;CT(UA]c& User-Agent: Gnus/5.090019 (Oort Gnus v0.19) Emacs/21.3.50 (windows-nt) Cancel-Lock: sha1:zopBMLKUvgUl3qTUsDoCY1CWZXg= Original-Xref: shelby.stanford.edu gnu.emacs.help:113792 Original-To: help-gnu-emacs@gnu.org X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1b5 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Help: List-Post: List-Subscribe: , List-Archive: List-Unsubscribe: , Errors-To: help-gnu-emacs-bounces+gnu-help-gnu-emacs=m.gmane.org@gnu.org Xref: main.gmane.org gmane.emacs.help:10286 X-Report-Spam: http://spam.gmane.org/gmane.emacs.help:10286 lawrence mitchell 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é!