From: Elena <egarrulo@gmail.com>
To: help-gnu-emacs@gnu.org
Subject: Re: font-lock-number-face
Date: Fri, 17 Dec 2010 01:14:18 -0800 (PST) [thread overview]
Message-ID: <e917d8b0-e879-44fe-aefb-5abc8ef2c7f2@c17g2000prm.googlegroups.com> (raw)
In-Reply-To: 8062wc12qa.fsf@mundaneum.com
On Nov 5, 10:31 am, Sébastien Vauban <wxhgmqzgw...@spammotel.com>
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
> > #'(lambda ()
> > (setq font-lock-keywords
> > (append font-lock-keywords
> > (list
> > (list (concat "\\<\\(" font-lock-number "\
> > \)\\>" )
> > (list 0 font-lock-number-face))
> > (list (concat "\\<\\(" font-lock-
> > hexnumber "\\)\\>" )
> > (list 0 font-lock-number-face))
> > )))))
>
> > This works fine for most modes, except multi-term.
>
> This looks really nice. But, when enabling it, my Gnus buffer become black and
> white only. Not true: I see your blue face for the numbers, but every other
> color customization is gone.
>
> Some sort of conflict between the color-theme and this? Priority? Not
> cumulative?
>
> Best regards,
> Seb
>
> --
> Sébastien 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.
next prev parent reply other threads:[~2010-12-17 9:14 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-11-04 18:19 font-lock-number-face Ritchie
2010-11-05 10:31 ` font-lock-number-face Sébastien Vauban
[not found] ` <6571e80e-43d2-4f68-9f78-be1d02d1dcab@o11g2000prf.googlegroups.com>
2010-12-17 4:56 ` font-lock-number-face Ritchie
2010-12-17 9:14 ` Elena [this message]
2010-12-17 22:24 ` font-lock-number-face Stefan Monnier
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
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=e917d8b0-e879-44fe-aefb-5abc8ef2c7f2@c17g2000prm.googlegroups.com \
--to=egarrulo@gmail.com \
--cc=help-gnu-emacs@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 external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.