From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.bugs Subject: bug#58940: [PATCH] feature/tree-sitter: Add more font lock faces Date: Sat, 05 Nov 2022 11:24:29 +0200 Message-ID: <83cza14uuq.fsf@gnu.org> References: <835yfxbkyy.fsf@gnu.org> <8ZKenedKBW2xqbSe_c0vWmeRbMQYCDlwFNvSMAYx9utQYeOKPHQQ-nKW9Y8nCcKRnFMmsnfonvA_0yixtSArBzVY_PkaNxxGWqhXoHjCZTo=@rjt.dev> Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="40019"; mail-complaints-to="usenet@ciao.gmane.io" Cc: casouri@gmail.com, 58940@debbugs.gnu.org To: Randy Taylor Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sat Nov 05 10:25:17 2022 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1orFQS-000ADp-37 for geb-bug-gnu-emacs@m.gmane-mx.org; Sat, 05 Nov 2022 10:25:16 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1orFQG-0002lx-RB; Sat, 05 Nov 2022 05:25:05 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1orFQE-0002la-6D for bug-gnu-emacs@gnu.org; Sat, 05 Nov 2022 05:25:02 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1orFQD-0001PG-U1 for bug-gnu-emacs@gnu.org; Sat, 05 Nov 2022 05:25:01 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1orFQD-000292-Pd for bug-gnu-emacs@gnu.org; Sat, 05 Nov 2022 05:25:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 05 Nov 2022 09:25:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 58940 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch Original-Received: via spool by 58940-submit@debbugs.gnu.org id=B58940.16676402838216 (code B ref 58940); Sat, 05 Nov 2022 09:25:01 +0000 Original-Received: (at 58940) by debbugs.gnu.org; 5 Nov 2022 09:24:43 +0000 Original-Received: from localhost ([127.0.0.1]:55460 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1orFPv-00028R-Fs for submit@debbugs.gnu.org; Sat, 05 Nov 2022 05:24:43 -0400 Original-Received: from eggs.gnu.org ([209.51.188.92]:36394) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1orFPr-00028C-72 for 58940@debbugs.gnu.org; Sat, 05 Nov 2022 05:24:42 -0400 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1orFPl-0001Mp-Qj; Sat, 05 Nov 2022 05:24:33 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date: mime-version; bh=W1fBtOrLgoyYUantiNpAFzyHjILBUGnh3c6+WjJLvqQ=; b=QhBLZPfcTP8d LJ2NualeurSarKslwGFsnLWsVnRshlzS7NPxMKb6cB4B50+Yh1d+gCzgzxGKU6GMF4c01hgCIfxi9 8iFvE6Z3sozlA1dI2m2SW/iX+imQNnsOjja8luj6KF0GoXs0y0jw7Oa/86GRRpazQ1jmMhUuxRd4K a9rt3ZgBlT2/516DDGHqJyJhOx0epl6Px02hiiCNAAMqKbElKfemqlglFmTpYyVUqIy6fcUqR4hhG vfYf5sOC5ovwiA1z0SzBYSpaendYLbwU4h+B5xlrIjztQbR3kc+3/OWczd/O6zC6t3oP8LwMtCkEJ HqwVGORXHTyZja2wq3wXIQ==; Original-Received: from [87.69.77.57] (helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1orFPl-0005ED-20; Sat, 05 Nov 2022 05:24:33 -0400 In-Reply-To: <8ZKenedKBW2xqbSe_c0vWmeRbMQYCDlwFNvSMAYx9utQYeOKPHQQ-nKW9Y8nCcKRnFMmsnfonvA_0yixtSArBzVY_PkaNxxGWqhXoHjCZTo=@rjt.dev> (message from Randy Taylor on Sat, 05 Nov 2022 02:46:30 +0000) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: "bug-gnu-emacs" Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.bugs:247139 Archived-At: > Date: Sat, 05 Nov 2022 02:46:30 +0000 > From: Randy Taylor > Cc: casouri@gmail.com, 58940@debbugs.gnu.org > > Sorry for the delay, furniture building took longer than anticipated > and desired. We all have our lives, no need to apologize. > +@item font-lock-delimiter-face > +@vindex font-lock-delimiter-face > +for delimiters (e.g. @code{;}, @code{:}, @code{,}). You need a comma or a @: after "e.g.", to avoid its being interpreted as the end of a sentence. > +@item font-lock-escape-face > +@vindex font-lock-escape-face > +for escape sequences in strings. I suggest an example of an escape sequence here, ideally from 2 or more programming languages. > +@smallexample > +typedef struct > +@{ > + int prop; > +// ^ property > +@} obj; > + > +int main() > +@{ > + obj o; > + o.prop = 3; > +// ^ property > +@} > +@end smallexample Please use @group..@end group here, since the two parts of this can be typeset on separate pages, but we don't want each one of thgem to be broken between pages. > --- a/etc/NEWS > +++ b/etc/NEWS > @@ -732,6 +732,13 @@ If the current buffer is visiting a file that is executable, the > This determines how long to pause Emacs after a process > filter/sentinel error has been handled. > > ++++ > +** New faces for font-lock. > +'font-lock-bracket-face', 'font-lock-delimiter-face', > +'font-lock-escape-face', 'font-lock-number-face', > +'font-lock-misc-punctuation-face', 'font-lock-operator-face', > +'font-lock-property-face', 'font-lock-punctuation-face'. Should this say that they are primarily meant for use with tree-sitter? > +(defvar font-lock-property-face 'font-lock-property-face > + "Face name to use for properties.") This doc string is too concise to be useful. Please add some information from the detailed descriptions above. > +(defface font-lock-bracket-face > + '((t :inherit font-lock-punctuation-face)) It is better to have the parent face font-lock-punctuation-face defined before it is used. Thanks.