emacs-devel
[Top][All Lists]
Advanced

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

Re: adding a standard font-lock-number-face


From: Stefan Monnier
Subject: Re: adding a standard font-lock-number-face
Date: Thu, 16 Jun 2011 23:19:44 -0400
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.50 (gnu/linux)

> So long story short: isn't a good idea to add a standard
> font-lock-number-face in order to have fine grained control on
> font-lock and give the users the chance to customize numbers
> decoration out of the box?

I don't think highlighting tokens that are only lexically relevant but
not syntactically relevant is a good idea.
E.g. it's good to highlight keywords because they determine structure.
It's good to highlight strings and comments because keywords within them
*don't* determine structure.
It's good to highlight identifier definitions because these are
semantically important and they tend to be a bit like section titles, so
syntactically meaningful.

But it's not useful to highlight all identifiers, or all numbers, or all
separators, or all infix operators, ... because that doesn't help the
user navigate his code.


        Stefan



reply via email to

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