From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: =?ISO-8859-1?Q?Andreas_R=F6hler?= Newsgroups: gmane.emacs.devel Subject: Re: adding a standard font-lock-number-face Date: Fri, 17 Jun 2011 07:25:55 +0200 Message-ID: <4DFAE563.5060903@online.de> References: NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Trace: dough.gmane.org 1308288388 21070 80.91.229.12 (17 Jun 2011 05:26:28 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Fri, 17 Jun 2011 05:26:28 +0000 (UTC) Cc: Stefan Monnier , Fabian Ezequiel Gallina To: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Fri Jun 17 07:26:24 2011 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([140.186.70.17]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1QXRZX-0004iZ-TF for ged-emacs-devel@m.gmane.org; Fri, 17 Jun 2011 07:26:24 +0200 Original-Received: from localhost ([::1]:59769 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QXRZX-0006Fe-0m for ged-emacs-devel@m.gmane.org; Fri, 17 Jun 2011 01:26:23 -0400 Original-Received: from eggs.gnu.org ([140.186.70.92]:44957) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QXRZF-0006FZ-Ke for emacs-devel@gnu.org; Fri, 17 Jun 2011 01:26:10 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1QXRZE-0006EY-CC for emacs-devel@gnu.org; Fri, 17 Jun 2011 01:26:05 -0400 Original-Received: from moutng.kundenserver.de ([212.227.126.187]:54664) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QXRZE-0006EQ-10 for emacs-devel@gnu.org; Fri, 17 Jun 2011 01:26:04 -0400 Original-Received: from [192.168.178.27] (brln-4dbc4912.pool.mediaWays.net [77.188.73.18]) by mrelayeu.kundenserver.de (node=mrbap4) with ESMTP (Nemesis) id 0LaU9f-1PnuCN3wK7-00mNae; Fri, 17 Jun 2011 07:26:01 +0200 User-Agent: Mozilla/5.0 (X11; U; Linux i686; de; rv:1.9.2.17) Gecko/20110414 SUSE/3.1.10 Thunderbird/3.1.10 In-Reply-To: X-Provags-ID: V02:K0:M3SwRLYDrzqaQyomJhje4YT1YoMM91lgGoY/5Ezs33q LTTdZm/UXN3JZ/7oFovHBDIQp9mtp8V5faywCH3Y0CWfTEWZJE 8Tu0ZGX2tsHxvDcqZS8Yx9IRZZGRaYEedo5zikd0UpWbPLgXeP bEVYyv3mSp1uEqAn3wR6Ynn8ElgUKBDLu3ckH8IKMUosEca3Qu y9Ursa7CDz9pycDR/Ej4lcyYQNkvV2BN9oKkctApJc= X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 212.227.126.187 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.14 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-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:140586 Archived-At: Am 17.06.2011 05:54, schrieb Fabian Ezequiel Gallina: > 2011/6/17 Stefan Monnier: >>> 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