From: "Andreas Röhler" <andreas.roehler@online.de>
To: emacs-devel@gnu.org
Cc: Stefan Monnier <monnier@IRO.UMontreal.CA>,
Fabian Ezequiel Gallina <galli.87@gmail.com>
Subject: Re: adding a standard font-lock-number-face
Date: Fri, 17 Jun 2011 07:25:55 +0200 [thread overview]
Message-ID: <4DFAE563.5060903@online.de> (raw)
In-Reply-To: <BANLkTikmM5avPGTZywqv9YJeegrhVYurgA@mail.gmail.com>
Am 17.06.2011 05:54, schrieb Fabian Ezequiel Gallina:
> 2011/6/17 Stefan Monnier<monnier@iro.umontreal.ca>:
>>> 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.
>>
>
> Thanks for the clarification Stefan, I was pretty sure there was a
> good reason why it wasn't there already.
>
> An argument I can think of for inclusion is that it seems highlighting
> those kind of stuff (event operators) is really common on other
> editors, so it is acceptable that people coming from other places
> would expect this kind of stuff highlighted out-of-the-box. I know the
> "people coming from other editors" argument is kinda weak, but I don't
> see why not giving them the chance to enable that easily in a vanilla
> Emacs.
>
> Please note that I'm no expert at font-locking but I think it might be
> good (and possible) to let modes to specify a higher or special level
> of font-locking so this kind of things can be highlighted. Let the
> default be the standard Emacs way, but giving the users the chance to
> enable that special level easily. This way standard font-lock
> performance shouldn't be hit.
>
> What do you think?
>
>
> Regards,
Hi Fabian,
don't know if my opinion here values a cent at all, :) but let me tell
that IMO you are right. As long as the default set not differs ie
inherits from default face, the user normally will not notice that
customizable.
OTOH user looking for will find it.
Cheers,
Andreas
next prev parent reply other threads:[~2011-06-17 5:25 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-06-17 2:00 adding a standard font-lock-number-face Fabian Ezequiel Gallina
2011-06-17 3:19 ` Stefan Monnier
2011-06-17 3:54 ` Fabian Ezequiel Gallina
2011-06-17 5:25 ` Andreas Röhler [this message]
2011-06-17 6:39 ` Stephen J. Turnbull
2011-06-17 13:34 ` Stefan Monnier
2011-06-17 13:38 ` Stefan Monnier
2011-06-17 14:22 ` Lennart Borgman
2011-06-17 15:14 ` Fabian Ezequiel Gallina
2011-06-17 16:25 ` Stefan Monnier
2011-06-17 20:42 ` Donald Ephraim Curtis
2011-06-17 21:04 ` Glenn Morris
2011-06-17 16:29 ` Donald Ephraim Curtis
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=4DFAE563.5060903@online.de \
--to=andreas.roehler@online.de \
--cc=emacs-devel@gnu.org \
--cc=galli.87@gmail.com \
--cc=monnier@IRO.UMontreal.CA \
/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.