From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED.blaine.gmane.org!not-for-mail From: Andy Moreton Newsgroups: gmane.emacs.devel Subject: Re: bat-mode: Inconsistent fontification. Consider using font-lock-function-name-face Date: Mon, 09 Sep 2019 11:48:09 +0100 Message-ID: References: Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Injection-Info: blaine.gmane.org; posting-host="blaine.gmane.org:195.159.176.226"; logging-data="8683"; mail-complaints-to="usenet@blaine.gmane.org" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (windows-nt) To: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Mon Sep 09 12:49:12 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 1i7HEO-00027f-9z for ged-emacs-devel@m.gmane.org; Mon, 09 Sep 2019 12:49:12 +0200 Original-Received: from localhost ([::1]:54996 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1i7HEM-0005G4-OR for ged-emacs-devel@m.gmane.org; Mon, 09 Sep 2019 06:49:10 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:59618) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1i7HDa-0005ER-IS for emacs-devel@gnu.org; Mon, 09 Sep 2019 06:48:24 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1i7HDY-00051H-MY for emacs-devel@gnu.org; Mon, 09 Sep 2019 06:48:22 -0400 Original-Received: from 195-159-176-226.customer.powertech.no ([195.159.176.226]:53826 helo=blaine.gmane.org) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1i7HDY-0004zt-Ee for emacs-devel@gnu.org; Mon, 09 Sep 2019 06:48:20 -0400 Original-Received: from list by blaine.gmane.org with local (Exim 4.89) (envelope-from ) id 1i7HDT-00010I-9m for emacs-devel@gnu.org; Mon, 09 Sep 2019 12:48:15 +0200 X-Injected-Via-Gmane: http://gmane.org/ Cancel-Lock: sha1:eHNGYQADVhLaFmbhwZjP+CCbrWw= X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 195.159.176.226 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:239952 Archived-At: On Mon 09 Sep 2019, Jostein Kjønigsen wrote: > Hey everyone. > > Right now Emacs' bat-mode has an inconsistent use of faces, both internally > and w.r.t. to the rest of the Emacs universe. > > In batch files you can create "labels". A label is a line whose character is : > followed by alpha-numerical characters. > > :EXAMPLE_LABEL > > These labels are often used via GOTO-statements for direct control flow, but > they can also be used via CALL-statements and then they work like > functions/subroutines and control is eventually returned to the caller. > > CALL :subroutine param1 param2 > GOTO :EOF > etc > > Right now labels have one custom-face defined for bat-mode (bat-label-face), > and all -uses- of this label via GOTO or CALL-statements has this label > highlighted using font-lock-constant-face. > > My proposal is that we change both these rules to instead be > font-lock-function-name-face. This solves both constency-problems: That is not consistent with c-mode, which uses font-lock-constant-face for both goto statements and labels. AndyM