From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Elena Newsgroups: gmane.emacs.help Subject: Re: font-lock-number-face Date: Fri, 17 Dec 2010 01:14:18 -0800 (PST) Organization: http://groups.google.com Message-ID: References: <8062wc12qa.fsf@mundaneum.com> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable X-Trace: dough.gmane.org 1292578876 21631 80.91.229.12 (17 Dec 2010 09:41:16 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Fri, 17 Dec 2010 09:41:16 +0000 (UTC) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Fri Dec 17 10:41:12 2010 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1PTWoK-0006ik-9B for geh-help-gnu-emacs@m.gmane.org; Fri, 17 Dec 2010 10:41:12 +0100 Original-Received: from localhost ([127.0.0.1]:42825 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1PTWoJ-0006xK-N2 for geh-help-gnu-emacs@m.gmane.org; Fri, 17 Dec 2010 04:41:11 -0500 Original-Path: usenet.stanford.edu!bloom-beacon.mit.edu!4.24.21.218.MISMATCH!newsfeed2.dallas1.level3.net!news.level3.com!postnews.google.com!c17g2000prm.googlegroups.com!not-for-mail Original-Newsgroups: gnu.emacs.help Original-Lines: 53 Original-NNTP-Posting-Host: 89.96.190.244 Original-X-Trace: posting.google.com 1292577258 23089 127.0.0.1 (17 Dec 2010 09:14:18 GMT) Original-X-Complaints-To: groups-abuse@google.com Original-NNTP-Posting-Date: Fri, 17 Dec 2010 09:14:18 +0000 (UTC) Complaints-To: groups-abuse@google.com Injection-Info: c17g2000prm.googlegroups.com; posting-host=89.96.190.244; posting-account=AFCLjAoAAABJAOf_HjgEEEi3ty-lG5m2 User-Agent: G2/1.0 X-HTTP-UserAgent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.2.13) Gecko/20101203 Firefox/3.6.13,gzip(gfe) Original-Xref: usenet.stanford.edu gnu.emacs.help:183369 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:77621 Archived-At: On Nov 5, 10:31=A0am, S=E9bastien Vauban wrote: > Hi Ritchie, > > > > Ritchie wrote: > > I'm trying to add a new face in my config file so that all the numbers > > will have different color. Here is what I have: > > > (make-face 'font-lock-number-face) > > (set-face-foreground 'font-lock-number-face "DodgerBlue4") > > (setq font-lock-number-face 'font-lock-number-face) > > (defvar font-lock-number "[0-9]+\\([eE][+-]?[0-9]*\\)?") > > (defvar font-lock-hexnumber "0[xX][0-9a-fA-F]+") > > > (add-hook 'font-lock-mode-hook > > =A0 =A0 =A0 =A0 =A0 #'(lambda () > > =A0 =A0 =A0 =A0 =A0 =A0 =A0 (setq font-lock-keywords > > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 (append font-lock-keywords > > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 (list > > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0(list (conca= t "\\<\\(" font-lock-number "\ > > \)\\>" ) > > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0= (list 0 font-lock-number-face)) > > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0(list (conca= t "\\<\\(" font-lock- > > hexnumber "\\)\\>" ) > > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0= (list 0 font-lock-number-face)) > > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0))))) > > > This works fine for most modes, except multi-term. > > This looks really nice. But, when enabling it, my Gnus buffer become blac= k and > white only. Not true: I see your blue face for the numbers, but every oth= er > color customization is gone. > > Some sort of conflict between the color-theme and this? =A0Priority? =A0N= ot > cumulative? > > Best regards, > =A0 Seb > > -- > S=E9bastien Vauban You have to play with the HOW parameter of `font-lock-add-keywords'. I have some highlighting which worked after setting HOW to t.