help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: font-lock-number-face


From: Sébastien Vauban
Subject: Re: font-lock-number-face
Date: Wed, 08 Dec 2010 15:34:46 -0000
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/23.1.50 (windows-nt)

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


reply via email to

[Prev in Thread] Current Thread [Next in Thread]