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: Sat, 25 Mar 2023 12:45:01 -0700 Message-ID: <10D725F2-9162-4BC3-B362-1F54719C8313@gmail.com> References: <79CDDA5E-421D-4760-B744-F0C661118711@gmail.com> <83lejlc8sy.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="9546"; mail-complaints-to="usenet@ciao.gmane.io" Cc: theo@thornhill.no, 62429@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 Sat Mar 25 20:46:15 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 1pg9qA-0002BR-Pi for geb-bug-gnu-emacs@m.gmane-mx.org; Sat, 25 Mar 2023 20:46:14 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pg9q0-0004y2-C9; Sat, 25 Mar 2023 15:46:04 -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 1pg9py-0004x1-HT for bug-gnu-emacs@gnu.org; Sat, 25 Mar 2023 15:46: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 1pg9py-0002U9-8p for bug-gnu-emacs@gnu.org; Sat, 25 Mar 2023 15:46:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1pg9px-0002vA-Rn for bug-gnu-emacs@gnu.org; Sat, 25 Mar 2023 15:46:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Yuan Fu Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 25 Mar 2023 19:46:01 +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.167977352211180 (code B ref 62429); Sat, 25 Mar 2023 19:46:01 +0000 Original-Received: (at 62429) by debbugs.gnu.org; 25 Mar 2023 19:45:22 +0000 Original-Received: from localhost ([127.0.0.1]:43553 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pg9pK-0002uF-8F for submit@debbugs.gnu.org; Sat, 25 Mar 2023 15:45:22 -0400 Original-Received: from mail-pl1-f170.google.com ([209.85.214.170]:33620) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pg9pH-0002tz-UR for 62429@debbugs.gnu.org; Sat, 25 Mar 2023 15:45:20 -0400 Original-Received: by mail-pl1-f170.google.com with SMTP id f22so737625plr.0 for <62429@debbugs.gnu.org>; Sat, 25 Mar 2023 12:45:19 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; t=1679773514; 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=+LpkgkdXDJranr+7ZlSvSRDGEmyorfJ+vlhU9qxqaTY=; b=mkYxhmqpE821OZ76Da/iuMA2d1Q2NDNCRo4FLPmtkNIkmb/ywaMLCl/WtLEKqhrYo+ vVIkhqIv2RLD4QyjUGjAplmB/fRXNZUdJ/XA/EM4grQdNxDwfhUDwF8p1sLHxA/l9ojT XT1awHDrG9RsbaZOgnjMDZ3ebJHS+B4UKYYmdxhtF5GMYK69wr21N4+1bzicQ31UWmtb 7nbj9XIQ5tuA4lI9odii3zpOwDu/dZKJ1RCT9+NrBCaO+HeDT0TIk1MotMKtsZ8XumWa GxX3EeSUnrM5z/a4DQVSppVVUUJrdAx9E9UkUibDrcR6wDA3s1ZNofsCLsEquK7xWPoC CB+Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1679773514; 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=+LpkgkdXDJranr+7ZlSvSRDGEmyorfJ+vlhU9qxqaTY=; b=mhvvB5R7uXoWTDVR6LFjZHpEYWzqm8UrWDwsH9w4dohm7WYdNbb6VAojxmaahPoves rQHV7z0pAjbBjMaGrDkg9FfM+oUCChEUnWyn5IQcaclHGjTRNld+Z/Hdr8K5YywwGPM3 e//JrV+PIA3d3EeompF6xT+hBkBS/+kp0B6yrJxnq6bIMcEW/BbkhhlXMEGydTnKOEl9 0K3zglEgST7iM9T7x7AIsOeybdfHPuo891DnT6S6pDNDGpCpO6ST/f4IUy9pEtawInMB jkAz/Zq3Dn3NynA1toslG1NYPkghRVDaUyNSaTw9pkD+jgUFMN+zjO027FOq+6ZWij3M H4cA== X-Gm-Message-State: AAQBX9dhAIy+omRzRqCUXABE+nmuXKl7FISfrFb2oKuN0tUvw/ovGHFs Zb5xT/2jG89mZJNxquYGwec= X-Google-Smtp-Source: AKy350YmIM1iNBrU7BHX/p69aoMLpwryV2kTEljJMp9Sj4z293UsX5CafFRHjC00fw8nfAEMWpQQKw== X-Received: by 2002:a17:90a:b397:b0:23f:7ff6:eba with SMTP id e23-20020a17090ab39700b0023f7ff60ebamr7477963pjr.0.1679773513902; Sat, 25 Mar 2023 12:45:13 -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 q6-20020a17090a7a8600b00233e860f69esm1742206pjf.56.2023.03.25.12.45.13 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Sat, 25 Mar 2023 12:45:13 -0700 (PDT) In-Reply-To: <83lejlc8sy.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:258626 Archived-At: > On Mar 25, 2023, at 5:30 AM, Eli Zaretskii wrote: >=20 >> Cc: theo@thornhill.no >> From: Yuan Fu >> Date: Fri, 24 Mar 2023 16:49:35 -0700 >>=20 >> Hey Theo, I want to add separate faces for JSX tags and attributes. >> Otherwise users will be in a world of pain if they want to use = different >> fontification for JSX tag and funcall, and JSX attribute and = constant. WDYT? >=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.) 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. 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. Yuan=