From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED.blaine.gmane.org!not-for-mail From: Alan Mackenzie Newsgroups: gmane.emacs.devel Subject: Re: Face for literal numbers. Date: Sun, 8 Sep 2019 13:25:39 +0000 Message-ID: <20190908132539.GC4443@ACM> References: <20190908024146.mcswvhkh7yzmvjyl@Ergus> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Injection-Info: blaine.gmane.org; posting-host="blaine.gmane.org:195.159.176.226"; logging-data="211648"; mail-complaints-to="usenet@blaine.gmane.org" User-Agent: Mutt/1.10.1 (2018-07-13) Cc: Paul Eggert , emacs-devel@gnu.org To: Ergus Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sun Sep 08 15:26:46 2019 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([209.51.188.17]) by blaine.gmane.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.89) (envelope-from ) id 1i6xDJ-000swP-DU for ged-emacs-devel@m.gmane.org; Sun, 08 Sep 2019 15:26:45 +0200 Original-Received: from localhost ([::1]:48830 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1i6xDF-0002Xr-8y for ged-emacs-devel@m.gmane.org; Sun, 08 Sep 2019 09:26:41 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:49755) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1i6xCK-0002TX-FC for emacs-devel@gnu.org; Sun, 08 Sep 2019 09:25:45 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1i6xCJ-0003oP-C5 for emacs-devel@gnu.org; Sun, 08 Sep 2019 09:25:44 -0400 Original-Received: from colin.muc.de ([193.149.48.1]:31196 helo=mail.muc.de) by eggs.gnu.org with smtp (Exim 4.71) (envelope-from ) id 1i6xCJ-0003nv-2D for emacs-devel@gnu.org; Sun, 08 Sep 2019 09:25:43 -0400 Original-Received: (qmail 97307 invoked by uid 3782); 8 Sep 2019 13:25:41 -0000 Original-Received: from acm.muc.de (p2E5D5E86.dip0.t-ipconnect.de [46.93.94.134]) by colin.muc.de (tmda-ofmipd) with ESMTP; Sun, 08 Sep 2019 15:25:39 +0200 Original-Received: (qmail 29955 invoked by uid 1000); 8 Sep 2019 13:25:39 -0000 Content-Disposition: inline In-Reply-To: <20190908024146.mcswvhkh7yzmvjyl@Ergus> X-Delivery-Agent: TMDA/1.1.12 (Macallan) X-Primary-Address: acm@muc.de X-detected-operating-system: by eggs.gnu.org: FreeBSD 9.x [fuzzy] X-Received-From: 193.149.48.1 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.org gmane.emacs.devel:239939 Archived-At: 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. 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 last two of these would be controversial: should an C or Elisp literal character count as a number for this purpose or not? 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).