From: Ergus <spacibba@aol.com>
To: Alan Mackenzie <acm@muc.de>
Cc: Paul Eggert <eggert@cs.ucla.edu>, emacs-devel@gnu.org
Subject: Re: Face for literal numbers.
Date: Sun, 8 Sep 2019 16:49:21 +0200 [thread overview]
Message-ID: <20190908144921.47sedsd6ireqiuwu@Ergus> (raw)
In-Reply-To: <20190908132539.GC4443@ACM>
On Sun, Sep 08, 2019 at 01:25:39PM +0000, Alan Mackenzie wrote:
>Hello, Ergus.
>
>On Sun, Sep 08, 2019 at 04:41:46 +0200, Ergus wrote:
>> Hi I have seen that vim provides a color for the literal numbers in
>> prog-modes. I was looking for something similar en emacs and
>> surprisingly there is nothing within emacs or at least in elpa. The only
>> similar (fully functional) package is in melpa:
>
>> https://github.com/Fanael/highlight-numbers
>
>> Could we provide some basic support for this without depending of
>> melpa. Such simple functionalities must be at least in elpa right?
>
>I'm against such a feature. "Because vim has it" doesn't seem like a
>sufficient justification.
>
Hi Alan:
I will not insist on this too much because it is basically an aesthetic
preference. I find it more "elegant" and up to now the package works
pretty fine for me (and it is not so complex actually).
And it is not only vim, but many other editors do (even very dumb ones)
at least for simple numeric constants.
>I'm against such a feature because it would be complicated. All of the
>following would need to get the new face:
> 5
> -5
> 0x27
> 0xffff'ffff /* in C++ Mode */
> 'a' /* in C Mode, etc. */
> ?a ; Emacs Lisp Mode
>
The code in the link supports most of those. And it is mode dependent already.
And it doesn't look to be very complex actually.
>The last two of these would be controversial: should an C or Elisp
>literal character count as a number for this purpose or not?
>
I don't think so; but there will be many opinions about if we ask, so I
won't ask again. I promise.
But in my opinion it makes more sense to support at least the most
general ones (the ones supported in the package, for example) than not
support anything.
>We could spend quite a lot of time bikeshedding about this proposed
>feature. Do we need it? I don't think we do.
>
>--
>Alan Mackenzie (Nuremberg, Germany).
>
I know how it works actually... So I will just ask the author if he is
fine adding it to elpa... half a loaf is better than no bread.
next prev parent reply other threads:[~2019-09-08 14:49 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-09-08 2:41 Face for literal numbers Ergus
2019-09-08 3:37 ` Stefan Monnier
2019-09-08 13:25 ` Alan Mackenzie
2019-09-08 14:49 ` Ergus [this message]
2019-09-08 17:57 ` Stefan Monnier
2019-09-08 18:15 ` Eli Zaretskii
2019-09-09 12:04 ` Ergus via Emacs development discussions.
2019-09-13 8:18 ` Richard Stallman
2019-09-09 17:50 ` Stephen Leake
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
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20190908144921.47sedsd6ireqiuwu@Ergus \
--to=spacibba@aol.com \
--cc=acm@muc.de \
--cc=eggert@cs.ucla.edu \
--cc=emacs-devel@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 public inbox
https://git.savannah.gnu.org/cgit/emacs.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).