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 19:34:44 +0200 Message-ID: References: <83ftl530zg.fsf@gnu.org> Mime-Version: 1.0 Content-Type: multipart/alternative; boundary="------------F8E7139519EE810461AE5EDB" Injection-Info: blaine.gmane.org; posting-host="blaine.gmane.org:195.159.176.226"; logging-data="178235"; 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: emacs-devel@gnu.org To: Eli Zaretskii , Andy Moreton Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Mon Sep 09 19:36: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 1i7Nah-000kBU-KG for ged-emacs-devel@m.gmane.org; Mon, 09 Sep 2019 19:36:40 +0200 Original-Received: from localhost ([::1]:59572 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1i7Nag-0004E0-I4 for ged-emacs-devel@m.gmane.org; Mon, 09 Sep 2019 13:36:38 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:49780) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1i7NYw-0002ef-Vu for emacs-devel@gnu.org; Mon, 09 Sep 2019 13:34:52 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1i7NYv-00071k-JJ for emacs-devel@gnu.org; Mon, 09 Sep 2019 13:34:50 -0400 Original-Received: from out3-smtp.messagingengine.com ([66.111.4.27]:40405) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1i7NYt-0006zA-PV; Mon, 09 Sep 2019 13:34:48 -0400 Original-Received: from compute6.internal (compute6.nyi.internal [10.202.2.46]) by mailout.nyi.internal (Postfix) with ESMTP id 342E9221D2; Mon, 9 Sep 2019 13:34:47 -0400 (EDT) Original-Received: from mailfrontend1 ([10.202.2.162]) by compute6.internal (MEProxy); Mon, 09 Sep 2019 13:34:47 -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; s=fm1; bh=ixuXuARF7 fRQgfiIY/4YPwHlqKJ1d7/iKyuHAiiDxuc=; b=XKCvSGRRxVYrUMBm2g2EWqAjs TNidFZntQX4C/tqy3Yom6zQQUGR/voJGf83X7NMiRJvWTOOt/tONPTyi4GRGp2T4 a1YezmMP8jjVQxUoeVT/wnCO3+k0P+ps6cX1UvfNbPiFBiJR7+sikeMYfwcOLC/3 ImVjWsYncRkKkx+RbyA61U/AIAidkEcpLQd8gsgMIf5INGJU2I6bp6h7TvN71ru3 8OqPAbPYo1dpftJutACDB+PgGjBFAptbh/9WbcSO2pEaTzblMzfZ0CzaI1xXFT9H w8MOyKEdtzknPNQIp3oNrPtDlnky8o7kQAkCpowLNKp9nXHcThvQgzmv+4umw== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc: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=ixuXuA RF7fRQgfiIY/4YPwHlqKJ1d7/iKyuHAiiDxuc=; b=y5/GLjUiuNHTqqvr/0Cjy8 gKv5h6ImQXlBd9tJ1/vvuYooJbOjgNonf6ZgcOMq0BzPxRGGankgTXNCPTASiHnc z5wDX9g6YDqeLcb474uTdRmIuBqS34HHI2qIOuErezsTUbSqWEJK9ATkvKULqnG3 GdZu3BDNnagCph3oMVLb9jPhva3QzPQZTuA9TmFfBTslhuZUz+4D1uJvBEHjfXvi F7DlFsYp/XJkAMHGF0IoKql0qi/7x4U/R0K7/yIqwGP+1IDBsJJ1lv3fMRj9tXDR sw3E2IUrfKFqlp+q0fP5jNkVE0Iuz7Cx6DxcZJ3kh973cpkkrKm4F1C1y/V8FbQw == X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeduvddrudekiedguddufecutefuodetggdotefrod ftvfcurfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfgh necuuegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmd enucfjughrpefuvfhfhffkffgfgggjtgesrgdtreertdefjeenucfhrhhomheplfhoshht vghinhgpmfhjpphnihhgshgvnhcuoehjohhsthgvihhnsehsvggtuhhrvgdrkhhjohhnih hgshgvnhdrnhgvtheqnecuffhomhgrihhnpehnihhgshgvnhdrnhhonecukfhppeekgedr vdduuddrfedvrdduvdeknecurfgrrhgrmhepmhgrihhlfhhrohhmpehjohhsthgvihhnse hsvggtuhhrvgdrkhhjohhnihhgshgvnhdrnhgvthenucevlhhushhtvghrufhiiigvpedt 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 653928005A; Mon, 9 Sep 2019 13:34:46 -0400 (EDT) In-Reply-To: <83ftl530zg.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:239958 Archived-At: This is a multi-part message in MIME format. --------------F8E7139519EE810461AE5EDB Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit On 9/9/19 6:09 PM, Eli Zaretskii wrote: >> That is not consistent with c-mode, which uses font-lock-constant-face >> for both goto statements and labels. > That's my feeling as well. We fontify labels with > font-lock-constant-face in other programming modes, so it would feel > wrong to deviate from that in bat-mode. > > As for uses of labels, I see your point about inconsistency, but maybe > this is justified due to the fact that batch-file labels can be > CALLed? 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? -- Kind regards *Jostein Kjønigsen* jostein@kjonigsen.net 🍵 jostein@gmail.com https://jostein.kjønigsen.no --------------F8E7139519EE810461AE5EDB Content-Type: text/html; charset=utf-8 Content-Transfer-Encoding: 8bit


On 9/9/19 6:09 PM, Eli Zaretskii wrote:
That is not consistent with c-mode, which uses font-lock-constant-face
for both goto statements and labels.
That's my feeling as well.  We fontify labels with
font-lock-constant-face in other programming modes, so it would feel
wrong to deviate from that in bat-mode.

As for uses of labels, I see your point about inconsistency, but maybe
this is justified due to the fact that batch-file labels can be
CALLed?
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?

--------------F8E7139519EE810461AE5EDB--