From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED.blaine.gmane.org!not-for-mail From: =?UTF-8?Q?Jostein_Kj=c3=b8nigsen?= Newsgroups: gmane.emacs.devel Subject: Re: bat-mode: Inconsistent fontification. Consider using font-lock-function-name-face Date: Mon, 9 Sep 2019 21:26:59 +0200 Message-ID: References: <83ftl530zg.fsf@gnu.org> <83blvt2vdr.fsf@gnu.org> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit Injection-Info: blaine.gmane.org; posting-host="blaine.gmane.org:195.159.176.226"; logging-data="113169"; mail-complaints-to="usenet@blaine.gmane.org" User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.0 Cc: andrewjmoreton@gmail.com, emacs-devel@gnu.org To: Eli Zaretskii Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Mon Sep 09 21:27:40 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 1i7PK6-000THI-2M for ged-emacs-devel@m.gmane.org; Mon, 09 Sep 2019 21:27:38 +0200 Original-Received: from localhost ([::1]:60212 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1i7PK4-0006SR-Eg for ged-emacs-devel@m.gmane.org; Mon, 09 Sep 2019 15:27:36 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:45810) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1i7PJa-0006S8-8h for emacs-devel@gnu.org; Mon, 09 Sep 2019 15:27:07 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1i7PJZ-0001bn-6t for emacs-devel@gnu.org; Mon, 09 Sep 2019 15:27:06 -0400 Original-Received: from out3-smtp.messagingengine.com ([66.111.4.27]:41243) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1i7PJW-0001b2-UJ; Mon, 09 Sep 2019 15:27:03 -0400 Original-Received: from compute6.internal (compute6.nyi.internal [10.202.2.46]) by mailout.nyi.internal (Postfix) with ESMTP id 5CB5922299; Mon, 9 Sep 2019 15:27:02 -0400 (EDT) Original-Received: from mailfrontend2 ([10.202.2.163]) by compute6.internal (MEProxy); Mon, 09 Sep 2019 15:27:02 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= secure.kjonigsen.net; h=subject:to:cc:references:from:message-id :date:mime-version:in-reply-to:content-type :content-transfer-encoding; s=fm1; bh=vQY8EqayXdym8EaB40WZRZM6C4 To4ZB/5ZTGInkr8+Q=; b=LeMnmWTIUvdkRwJsFp59fm+Nvx67+FBUj4KMRVfbfO kndKLfr4WRXRIlJzWOzFFJcnj9oqjv5Y03KHfiXBCRjr4gbCGMV/WueOWy1O5ZWw 9BtROT/ru0JJjlkbG/ZjAw5b6UkYGVpVTHG2b3CdKuNZitYTSpdAlIEeZJOT84qt XhsAvLk98PtIEF8sjVghF7ltfQdXkD0TJXjmMJLq7vaVT8oBJo58wRHlx9WtW0jM v3lO9a2bEcXPvq491sXZnmn4Mg1DaCv781/iSFI2Q5Y4pqCaKtGmnjKzHVJsFOic +qZM6RLc9HB2K1tLZR1lEDVUwu9jJflbci9ltuDN7fIw== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-transfer-encoding:content-type :date:from:in-reply-to:message-id:mime-version:references :subject:to:x-me-proxy:x-me-proxy:x-me-sender:x-me-sender :x-sasl-enc; s=fm3; bh=vQY8EqayXdym8EaB40WZRZM6C4To4ZB/5ZTGInkr8 +Q=; b=xAYuxVaUxks2YglYQ0n39cay9dVawYMARDDlQv7Z12qa7sLrv9NfcN+b3 Lqgi2G6MpRW/HjN3DYROcxQksU8dRS56HMHgfxXpdZmOD4Uzsew8/ZR4HqoIvciK VhvpK4mVMydeGffIa2Lazqcjo3fac6KSv6HS+JY/LBr2FDYn9g411eQfvBT+YdDS ri3QHr8IA/i1xOfjErtt3MA65mtjDsjSK2r5pRezoAO9HaAKRygstvGVj1cyxmqi 1BBz+HN5yyhKwyS40QG2GrmLaeM+hpTyCqW5z/MNrejKT0VoYMcePfkc5ZmFrZm0 y+3R8xp++TDPyUI4leNes1ypxsz2A== X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeduvddrudekiedgudefhecutefuodetggdotefrod ftvfcurfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfgh necuuegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmd enucfjughrpefuvfhfhffkffgfgggjtgfgsehtkeertddtfeejnecuhfhrohhmpeflohhs thgvihhnpgfmjhppnhhighhsvghnuceojhhoshhtvghinhesshgvtghurhgvrdhkjhhonh highhsvghnrdhnvghtqeenucfkphepkeegrddvuddurdefvddruddvkeenucfrrghrrghm pehmrghilhhfrhhomhepjhhoshhtvghinhesshgvtghurhgvrdhkjhhonhhighhsvghnrd hnvghtnecuvehluhhsthgvrhfuihiivgeptd X-ME-Proxy: Original-Received: from [192.168.1.110] (cm-84.211.32.128.getinternet.no [84.211.32.128]) by mail.messagingengine.com (Postfix) with ESMTPA id 1129ED6005E; Mon, 9 Sep 2019 15:27:00 -0400 (EDT) In-Reply-To: <83blvt2vdr.fsf@gnu.org> Content-Language: en-GB X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 66.111.4.27 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:239963 Archived-At: On 9/9/19 8:10 PM, Eli Zaretskii wrote: >> Cc: emacs-devel@gnu.org >> From: Jostein Kjønigsen >> Date: Mon, 9 Sep 2019 19:34:44 +0200 >> >> If the concept of a label is used consistently across many major-modes, maybe it would make sense to define >> this as a first-class font-lock concept? >> >> Basically we could have an official "font-lock-label-face" instead, which by default would be derived from >> font-lock-constant-face. That way people who want labels to look more like functions can customize it on their >> end. >> >> Would that be a better option? > I don't know, I never felt the need to distinguish them. Thanks for your feedback Eli. Not knowing your background, I'd hate to make assumptions, but could it be that your work mainly involves languages where a label (a pointer) and a constant (also possibly a pointer) largely represents the same thing, as it does in C? To contrast your experience with mine, I mostly work with languages where a label and a constant represents 2 semantically different things, and mixing them in code will more often than not cause  the compiler to error out. IMO they may be -used- similarly in some languages, but there's intrinsically nothing fundamentally similar about them outside those languages. Even completely discounting that, I don't believe adding some additional default font-lock faces adds any considerable bloat or runtime-cost to Emacs. Or am I wrong about this? If it doesn't, I really don't see any good argument -against- adding more semanticly accurate font-lock faces. I'm sure there are several major-modes where this can be put to good use (instead of relying on custom-faces, like bat-mode already does). I'll admit to not following emacs-devel intimitely, so it may be that this is already a common ("done to death") discussion. If so I'd appreciate a pointer to a thread which better highlights the current  consensus wrt to font-lock faces. -- Jostein