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#62429: 30.0.50; Add jsx faces to typescript-ts-mode Date: Thu, 30 Mar 2023 08:25:17 +0300 Message-ID: <83wn2y6caq.fsf@gnu.org> References: <79CDDA5E-421D-4760-B744-F0C661118711@gmail.com> <83lejlc8sy.fsf@gnu.org> <10D725F2-9162-4BC3-B362-1F54719C8313@gmail.com> <837cv4b020.fsf@gnu.org> <9E07A07B-EDF4-436F-8208-01D2CCA7A7AF@gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="16994"; mail-complaints-to="usenet@ciao.gmane.io" Cc: theo@thornhill.no, 62429@debbugs.gnu.org, monnier@iro.umontreal.ca To: Yuan Fu Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Thu Mar 30 07:26:21 2023 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 1phknl-0004Cf-OU for geb-bug-gnu-emacs@m.gmane-mx.org; Thu, 30 Mar 2023 07:26:21 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1phknb-0006wZ-DG; Thu, 30 Mar 2023 01:26:12 -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 1phknS-0006s1-TP for bug-gnu-emacs@gnu.org; Thu, 30 Mar 2023 01:26:04 -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 1phknS-0007OX-Kf for bug-gnu-emacs@gnu.org; Thu, 30 Mar 2023 01:26:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1phknS-0003DU-BA for bug-gnu-emacs@gnu.org; Thu, 30 Mar 2023 01:26:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 30 Mar 2023 05:26:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 62429 X-GNU-PR-Package: emacs Original-Received: via spool by 62429-submit@debbugs.gnu.org id=B62429.168015391512306 (code B ref 62429); Thu, 30 Mar 2023 05:26:02 +0000 Original-Received: (at 62429) by debbugs.gnu.org; 30 Mar 2023 05:25:15 +0000 Original-Received: from localhost ([127.0.0.1]:55410 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1phkmh-0003CQ-7s for submit@debbugs.gnu.org; Thu, 30 Mar 2023 01:25:15 -0400 Original-Received: from eggs.gnu.org ([209.51.188.92]:39886) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1phkmf-0003CB-QG for 62429@debbugs.gnu.org; Thu, 30 Mar 2023 01:25:14 -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 1phkma-00075n-2a; Thu, 30 Mar 2023 01:25:08 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-version:References:Subject:In-Reply-To:To:From: Date; bh=W8fEc2IBnBzMxSof1dkSDRJnL9P/krOV+k9gJUtdezU=; b=nUy6ehDV8HHFoUIVDcY/ REjvRMMzHmgTsmZsdTNKjyHgNy+ddrhpu3YLQmwF/rj3DzuNJiY2CNO31RiPVK+G66FsVUf5jCCyN haeoR6weI9F8Dhqz0vTYiQAS07/rWXkg01BjEL3OpwpAmPlu0vBSji5/871qqJNDH2isrBPFysq7C sZf036IgPFDBw0aSryyZwpSzHs8pknCkTfaM+9HbMYHJ9ecagjLuibxR5jEbQvq2w6c60uxBReVl3 4ODg6slVYpguxYsBpKnkvB+OV4KF3JupKt5k9RKWXU4Q/cD05Bx0w9s9IZDlvSMP2+Dblg/5/VMty LAdcaGwuj1ibCQ==; 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 1phkmZ-0001bY-8n; Thu, 30 Mar 2023 01:25:07 -0400 In-Reply-To: <9E07A07B-EDF4-436F-8208-01D2CCA7A7AF@gmail.com> (message from Yuan Fu on Wed, 29 Mar 2023 17:28:40 -0700) 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: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.bugs:258884 Archived-At: > From: Yuan Fu > Date: Wed, 29 Mar 2023 17:28:40 -0700 > Cc: monnier@iro.umontreal.ca, > 62429@debbugs.gnu.org, > theo@thornhill.no > > >> JSX is basically HTML mixed with Javascript, so JSX tags and attributes are just HTML tags and attributes. Normally it’s fine to just use some semi-related font-lock face for them; mhtml.el uses function-call-face and constant-face for tags and attributes. But because in JSX, HTML tags and attribtues appear in the same buffer with Javascript code, if we use function-call-face and constant-face for tags and attributes, it’s impossible to change their appearance and not affect the functions and constants in Javascript code, because we are using the same face for JS functions and HTML tags, and JS constants and HTML attributes. > > > > OK, but then how will these JSX-specific faces fit into the overall > > scheme of treesit-font-lock faces? For example, in what level will > > they be used, and how will users know what level to set to see these > > faces in their buffers? > > At level 3 for tsx-ts-mode, under the “jsx” feature. So they are enabled by default. Though it’s true that it’s not immediately obvious what face to customize. At the very least these faces appear in the customize group of typescript. We can add something to the docstring of the major mode, too. > > > > > These are the downsides of mode-specific faces, and if we think it's > > important enough to have them, we should resolve these issues when we > > install such faces. Then it is fine by me, as long as those measures you mentioned are taken to make sure users know how to customize font-lock with these faces.