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: Wed, 29 Mar 2023 17:28:40 -0700 Message-ID: <9E07A07B-EDF4-436F-8208-01D2CCA7A7AF@gmail.com> References: <79CDDA5E-421D-4760-B744-F0C661118711@gmail.com> <83lejlc8sy.fsf@gnu.org> <10D725F2-9162-4BC3-B362-1F54719C8313@gmail.com> <837cv4b020.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="21833"; mail-complaints-to="usenet@ciao.gmane.io" Cc: theo@thornhill.no, 62429@debbugs.gnu.org, monnier@iro.umontreal.ca To: Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Thu Mar 30 02:29:27 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 1phgAR-0005Tt-6D for geb-bug-gnu-emacs@m.gmane-mx.org; Thu, 30 Mar 2023 02:29:27 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1phgA5-0006vp-Hj; Wed, 29 Mar 2023 20:29: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 1phgA4-0006vg-7g for bug-gnu-emacs@gnu.org; Wed, 29 Mar 2023 20:29: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 1phgA3-0003BA-Mh for bug-gnu-emacs@gnu.org; Wed, 29 Mar 2023 20:29:03 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1phgA2-0003eG-9M for bug-gnu-emacs@gnu.org; Wed, 29 Mar 2023 20:29:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Yuan Fu Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 30 Mar 2023 00:29: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.168013614014016 (code B ref 62429); Thu, 30 Mar 2023 00:29:02 +0000 Original-Received: (at 62429) by debbugs.gnu.org; 30 Mar 2023 00:29:00 +0000 Original-Received: from localhost ([127.0.0.1]:55258 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1phgA0-0003dz-3J for submit@debbugs.gnu.org; Wed, 29 Mar 2023 20:29:00 -0400 Original-Received: from mail-pl1-f169.google.com ([209.85.214.169]:37818) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1phg9y-0003dm-2B for 62429@debbugs.gnu.org; Wed, 29 Mar 2023 20:28:58 -0400 Original-Received: by mail-pl1-f169.google.com with SMTP id o2so16580104plg.4 for <62429@debbugs.gnu.org>; Wed, 29 Mar 2023 17:28:58 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; t=1680136132; 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=JVyhCCTWDKYGV95biSDPvKAQ2BI74LxumGCiZtSRe+4=; b=Ch+3AB+oGtKy/rLMo26vkhLlcojWAcJySQO27+DJcjqXuwpWMlr8eJNZRUCGmaG9VA OLgKxIliRHF8fjamnIbghgzDWOa2nhVdWB5Ur0fQHkND542UIjky7tgb68ajhY4sjCQr FEJaVlnWY5AtsT+ug+sMdhivwiwrkhr2jZSSUS90KrTRESIhdfTKd+0ocGh41bgHmxD5 pg4K7akJVWxW2ahch8UyCJzYYNz5Dfs5guvyVYWZfdzICT3b23mll4Jn/HuhQqueEiz7 utzYI5+iAyYMWO+wOSlCSd91PDDHPJF9kutZJSjGt3z0IM7d2KBoGHPVX6mBhpitvx9r EOhQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1680136132; 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=JVyhCCTWDKYGV95biSDPvKAQ2BI74LxumGCiZtSRe+4=; b=m2dM9NpbCL4Npowi3IazDQOZ0/KvwfgPJ8Th2xPgSJyjsupMs4VBEdhxvC1MkpgXug tcsOnKfc6uR3WrSvWcn/W/Ji7FE/HuwyEd9JBoy//vGmyJLevuathOkAc+NnIlKOrKkH EHS51sliRhhI0zTj3gP35b9yy2RTW+nREAohRtCzZdgsO7QucgTjUAUp2uHlbH9HZoYB lE8LMcvZhs4y/Dt7t6Bah5+r/67MOgQNgHDZ9sf2YopJqworA0Hr+Wya/ZNeV+zSrc+L UJ3HzlJq42KkoB4/NvueiBbrUa1qQdXyE1R6J4ohU5oWeEbXthjD2V2XUr2hNWUhOycy flcg== X-Gm-Message-State: AAQBX9ekO+fKvUSgy81DmUpMkBP7vxPSNj79wJ/sgAB46GRrYTU7J1Lh 4lULsqphZ+FlslhBNhcB/JU= X-Google-Smtp-Source: AKy350ZzONYdhG2cZJddHIzDhlmAYCR92swWDkQ3xjXLrDZDXUj30c7s0FDvRzIk3FXRyaykh/P9qg== X-Received: by 2002:a17:90a:318d:b0:237:d867:2260 with SMTP id j13-20020a17090a318d00b00237d8672260mr4072928pjb.4.1680136131964; Wed, 29 Mar 2023 17:28:51 -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 h5-20020a170902748500b0019c91d3bdb4sm23432033pll.304.2023.03.29.17.28.50 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Wed, 29 Mar 2023 17:28:51 -0700 (PDT) In-Reply-To: <837cv4b020.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:258878 Archived-At: > On Mar 25, 2023, at 9:37 PM, Eli Zaretskii wrote: >=20 >> From: Yuan Fu >> Date: Sat, 25 Mar 2023 12:45:01 -0700 >> Cc: Stefan Monnier , >> 62429@debbugs.gnu.org, >> theo@thornhill.no >>=20 >>> On Mar 25, 2023, at 5:30 AM, Eli Zaretskii wrote: >>>=20 >>> We never had any mode-specific faces for font-lock, AFAIK. Why is >>> this case different? Why not use one of the existing font-lock = faces, >>> or even add new ones (but not specific to JSX)? >>>=20 >>> (Adding Stefan.) >>=20 >> IFIAK, css-mode has its own face. These two faces are specific to = HTML and not widely applicable to other languages like other font-lock = faces do. >>=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? 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 > 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. Yuan=