From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Yuan Fu Newsgroups: gmane.emacs.bugs Subject: bug#62429: 30.0.50; Add jsx faces to typescript-ts-mode Date: Thu, 30 Mar 2023 01:11:48 -0700 Message-ID: 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> <83wn2y6caq.fsf@gnu.org> Mime-Version: 1.0 (Mac OS X Mail 16.0 \(3731.400.51.1.1\)) Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="23507"; mail-complaints-to="usenet@ciao.gmane.io" Cc: theodor thornhill , 62429-done@debbugs.gnu.org, Stefan Monnier To: Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Thu Mar 30 10:13:24 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 1phnPQ-0005ul-0l for geb-bug-gnu-emacs@m.gmane-mx.org; Thu, 30 Mar 2023 10:13:24 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1phnP8-0001OU-2H; Thu, 30 Mar 2023 04:13:06 -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 1phnP5-0001No-Nv for bug-gnu-emacs@gnu.org; Thu, 30 Mar 2023 04:13: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 1phnP5-0002Qv-GK for bug-gnu-emacs@gnu.org; Thu, 30 Mar 2023 04:13:03 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1phnP4-0007kE-P9 for bug-gnu-emacs@gnu.org; Thu, 30 Mar 2023 04:13:02 -0400 Resent-From: Yuan Fu Original-Sender: "Debbugs-submit" Resent-To: bug-gnu-emacs@gnu.org Resent-Date: Thu, 30 Mar 2023 08:13:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: cc-closed 62429 X-GNU-PR-Package: emacs Mail-Followup-To: 62429@debbugs.gnu.org, casouri@gmail.com, casouri@gmail.com Original-Received: via spool by 62429-done@debbugs.gnu.org id=D62429.168016393429696 (code D ref 62429); Thu, 30 Mar 2023 08:13:02 +0000 Original-Received: (at 62429-done) by debbugs.gnu.org; 30 Mar 2023 08:12:14 +0000 Original-Received: from localhost ([127.0.0.1]:55690 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1phnOH-0007iu-Ix for submit@debbugs.gnu.org; Thu, 30 Mar 2023 04:12:13 -0400 Original-Received: from mail-pj1-f51.google.com ([209.85.216.51]:42750) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1phnOC-0007iW-I8 for 62429-done@debbugs.gnu.org; Thu, 30 Mar 2023 04:12:09 -0400 Original-Received: by mail-pj1-f51.google.com with SMTP id h12-20020a17090aea8c00b0023d1311fab3so18810871pjz.1 for <62429-done@debbugs.gnu.org>; Thu, 30 Mar 2023 01:12:08 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; t=1680163922; h=to:references:message-id:content-transfer-encoding:cc:date :in-reply-to:from:subject:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=AZssTyE2EP0d+pwUmmre+MlzIqnVZiHdtU8jdduMg/I=; b=FTOIZDmQaP9wHsTvMnQNRJaXy6F0u9YVLEuKr9fNTwlPrV5fsZ6I7qCAV19fa8H5JN GkjcQiMV9QeKryxvDJ5pRFu89XF5N6dS09Yh6DeuQCG4rnAWh9HBwMMaAgbw8T44Gm7a gLcDsNzlXpP/mFdcPapuntpiAhEVy5Diw65EupO1IQqGFlspjv2WTtBDzfGZGUiI/T/S CeQoqFSTLqT7CeCk/EcRgwk2YROfH43VBDCdZDuhlX9dM6Wblmr0SmdJvpZyYGiVi+qZ M1J3Rqg1px928NUlJZgYkASXU1fb78NHQLdTRrBCDZbOz8ytUWMg4XIlVuJ2VXl3h0l5 scyA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1680163922; h=to:references:message-id:content-transfer-encoding:cc:date :in-reply-to:from:subject:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=AZssTyE2EP0d+pwUmmre+MlzIqnVZiHdtU8jdduMg/I=; b=efG5DocNRptWRVG9Id8Khk9QZNL2ihDnMtulvjHs80QClfkwzYnTn8m+3MtwYsi99N TQbfeGMdfDuxis+aEort7KVEBE29qXLPoEns1miGoL7IJjofe9tkTXE4WkHD9m3kRLc1 Q+SQXLm/sFLtJDKc8PJiVM2nyezvA/mK32Os7f0WA1ZV5ki7hUyTa+LjUxaVNg+b6WmQ ARhyr3j/AmNYQfLF1lSKDpByJt2WWV4GA/wlwgQ/GK3Qyr4Dl0826Yj73ouePSfrGiU2 tkK3ifFADvpQ/jhS6Dk/lfA7WPp+T05gDqpus/L4c5Z6AEbHPkS9Vimx8S+9UmBUvM03 PExw== X-Gm-Message-State: AAQBX9ekAMn1ddcIux3qVJr6rok3KB/607JaIqRoxyiWBFH7D7lgu+8d TVDm5R+YcKmPznr/jP0WG38= X-Google-Smtp-Source: AKy350bZRmSP2Fo5zUm7hUy70fNKNAkAAAtLvdkhVMf1OJrnevxmFLFUHBP8FNNrPcd6DjeGT3RGNg== X-Received: by 2002:a17:90b:1bc2:b0:23d:39e0:142 with SMTP id oa2-20020a17090b1bc200b0023d39e00142mr24822330pjb.42.1680163922445; Thu, 30 Mar 2023 01:12:02 -0700 (PDT) Original-Received: from smtpclient.apple (cpe-172-117-161-177.socal.res.rr.com. [172.117.161.177]) by smtp.gmail.com with ESMTPSA id g11-20020a17090a300b00b00233e860f69esm2616595pjb.56.2023.03.30.01.12.01 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Thu, 30 Mar 2023 01:12:02 -0700 (PDT) In-Reply-To: <83wn2y6caq.fsf@gnu.org> X-Mailer: Apple Mail (2.3731.400.51.1.1) 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:258902 Archived-At: > On Mar 29, 2023, at 10:25 PM, Eli Zaretskii wrote: >=20 >> From: Yuan Fu >> Date: Wed, 29 Mar 2023 17:28:40 -0700 >> Cc: monnier@iro.umontreal.ca, >> 62429@debbugs.gnu.org, >> theo@thornhill.no >>=20 >>>> JSX is basically HTML mixed with Javascript, so JSX tags and = attributes are just HTML tags and attributes. Normally it=E2=80=99s 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=E2=80=99s 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. >>>=20 >>> 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? >>=20 >> At level 3 for tsx-ts-mode, under the =E2=80=9Cjsx=E2=80=9D feature. = So they are enabled by default. Though it=E2=80=99s true that it=E2=80=99s= 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. >>=20 >>>=20 >>> 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. >=20 > 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. Cool. I pushed the change. Yuan=