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: Fri, 24 Mar 2023 16:49:35 -0700 Message-ID: <79CDDA5E-421D-4760-B744-F0C661118711@gmail.com> Mime-Version: 1.0 (Mac OS X Mail 16.0 \(3731.400.51.1.1\)) Content-Type: multipart/mixed; boundary="Apple-Mail=_36B1A9E6-C68B-42E6-A750-6BFFD67864A6" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="3259"; mail-complaints-to="usenet@ciao.gmane.io" Cc: theo@thornhill.no To: 62429@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sat Mar 25 01:10:34 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 1pfrUP-0000YY-Tg for geb-bug-gnu-emacs@m.gmane-mx.org; Sat, 25 Mar 2023 01:10:34 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pfrTy-0000Nw-QP; Fri, 24 Mar 2023 20:10:08 -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 1pfrTm-0000Lb-4z for bug-gnu-emacs@gnu.org; Fri, 24 Mar 2023 20:09:54 -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 1pfrTl-0005xE-TY for bug-gnu-emacs@gnu.org; Fri, 24 Mar 2023 20:09:53 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1pfrBW-0006ff-LY; Fri, 24 Mar 2023 19:51:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Yuan Fu Original-Sender: "Debbugs-submit" Resent-CC: theo@thornhill.no, bug-gnu-emacs@gnu.org Resent-Date: Fri, 24 Mar 2023 23:51:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 62429 X-GNU-PR-Package: emacs X-Debbugs-Original-To: Bug Report Emacs X-Debbugs-Original-Xcc: theo@thornhill.no Original-Received: via spool by submit@debbugs.gnu.org id=B.167970180625563 (code B ref -1); Fri, 24 Mar 2023 23:51:02 +0000 Original-Received: (at submit) by debbugs.gnu.org; 24 Mar 2023 23:50:06 +0000 Original-Received: from localhost ([127.0.0.1]:41705 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pfrAb-0006eE-MD for submit@debbugs.gnu.org; Fri, 24 Mar 2023 19:50:05 -0400 Original-Received: from [209.51.188.17] (port=38426 helo=lists.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pfrAZ-0006db-Nu for submit@debbugs.gnu.org; Fri, 24 Mar 2023 19:50: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 1pfrAS-0005wR-Va for bug-gnu-emacs@gnu.org; Fri, 24 Mar 2023 19:49:57 -0400 Original-Received: from mail-pl1-x631.google.com ([2607:f8b0:4864:20::631]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1pfrAQ-0000k0-TO for bug-gnu-emacs@gnu.org; Fri, 24 Mar 2023 19:49:56 -0400 Original-Received: by mail-pl1-x631.google.com with SMTP id o2so3297473plg.4 for ; Fri, 24 Mar 2023 16:49:51 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; t=1679701789; h=to:date:message-id:subject:mime-version:from:from:to:cc:subject :date:message-id:reply-to; bh=Rf9wMgmUp3qPTAq19f1wAwKvBAfDaqqYnPiHrcNOdFo=; b=n8RnTj6JwY8xDY0DRJK892rVEdkMC/3ko7L11mVpx0yIcRHQRQ3TPQItmEDI7Y3wIh d12MLHWrrQMPdr8MrLerCAznIPIXOmd/odxcmdJ0Ik5YvBlrqnBlboSY67jsw8+Qyc8Z QQW8LT/Z4ntFrrlAeMWtEet7/UkISUBy2yWRpaGBIuvAFZtswEVCQapIyyHt0YP3I3kF 4eDE1/zgGNnZw9t/yLrqBFMherUj2HFX0H15Wx5/He3gEjT+YH9WrinynJKckxC4qJm0 4sWtUEM7SSPGvjgIUsJFDHHEtbnBAv4mNaNZHtAV38IPuYqk+MA/1eLoDrCStJutObJf eyqA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1679701789; h=to:date:message-id:subject:mime-version:from:x-gm-message-state :from:to:cc:subject:date:message-id:reply-to; bh=Rf9wMgmUp3qPTAq19f1wAwKvBAfDaqqYnPiHrcNOdFo=; b=XV1jPF2bfHE5u04MfTgSQcV5qFtnsGc8KS9tfP1ziWeb6tCWu45FOyrWkPIuOOEySz SlSGjTwMKZfGxl9xirmNH2Tl8PGBrdawMHq9vFaH+K31Vs2hQ3E089Qj8rk7PqoycWv5 yE9UXLjN93aqfzpc7Up8VZmnn9o19qPesCOLvt+dX1mDDbEkv/KvRG7w6wrwohCQsL5N cPzGlfuV2+lvvDg/Ih4HXM9Togeql3niT/uNgrTVT6iZ+j/yvFjJwajfdr8wjNv52m4A swgD2OvxlNgGkUIB+qCnPE60xY1vlhPn3Rn7FODsX6Q3/X8FIZZEuOH/1jFm1cxQ6Jaq +kcQ== X-Gm-Message-State: AAQBX9e0kvg+h01hswZzhUJdYZLei6Fdb4W0jwthOz4hsrVjvM0F0/HM M4TyAkEwYGWOr/oY8HEQfHr3930G1HMYdw== X-Google-Smtp-Source: AKy350ZMZfUEoGJL+FwvF4cRRXQb4+QN5H6j8NMtvfklSbeYHKpwyAallHfLvXY2bkEuqTuNXgRIzQ== X-Received: by 2002:a17:903:2341:b0:19c:e666:a678 with SMTP id c1-20020a170903234100b0019ce666a678mr3962108plh.50.1679701788356; Fri, 24 Mar 2023 16:49:48 -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 g9-20020a170902934900b0019f1205bdcbsm14683685plp.147.2023.03.24.16.49.46 for (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Fri, 24 Mar 2023 16:49:46 -0700 (PDT) X-Mailer: Apple Mail (2.3731.400.51.1.1) Received-SPF: pass client-ip=2607:f8b0:4864:20::631; envelope-from=casouri@gmail.com; helo=mail-pl1-x631.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action 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:258535 Archived-At: --Apple-Mail=_36B1A9E6-C68B-42E6-A750-6BFFD67864A6 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset=us-ascii X-Debbugs-CC: theo@thornhill.no 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? Yuan --Apple-Mail=_36B1A9E6-C68B-42E6-A750-6BFFD67864A6 Content-Disposition: attachment; filename=faces.patch Content-Type: application/octet-stream; x-unix-mode=0644; name="faces.patch" Content-Transfer-Encoding: quoted-printable =46rom=206a52f34fff83908312881b9f46f07bf54597ff6f=20Mon=20Sep=2017=20= 00:00:00=202001=0AFrom:=20Yuan=20Fu=20=0ADate:=20Fri,=20= 24=20Mar=202023=2016:45:15=20-0700=0ASubject:=20[PATCH]=20Add=20two=20= typescript-ts-mode=20faces=0A=0A*=20= lisp/progmodes/typescript-ts-mode.el:=0A= (typescript-ts-mode-jsx-tag-face)=0A= (typescript-ts-mode-jsx-attribute-face):=20New=20faces.=0A= (typescript-ts-mode--font-lock-settings):=20Use=20new=20faces.=0A---=0A=20= lisp/progmodes/typescript-ts-mode.el=20|=2016=20++++++++++++----=0A=201=20= file=20changed,=2012=20insertions(+),=204=20deletions(-)=0A=0Adiff=20= --git=20a/lisp/progmodes/typescript-ts-mode.el=20= b/lisp/progmodes/typescript-ts-mode.el=0Aindex=20= a9ca85d5d35..207c3f03b88=20100644=0A---=20= a/lisp/progmodes/typescript-ts-mode.el=0A+++=20= b/lisp/progmodes/typescript-ts-mode.el=0A@@=20-41,6=20+41,14=20@@=20= typescript-ts-mode-indent-offset=0A=20=20=20:safe=20'integerp=0A=20=20=20= :group=20'typescript)=0A=20=0A+(defface=20typescript-ts-jsx-tag-face=0A+=20= =20'((t=20.=20(:inherit=20font-lock-function-call-face)))=0A+=20=20"Face=20= for=20HTML=20tags=20like=20
=20and=20

=20in=20JSX.")=0A+=0A= +(defface=20typescript-ts-jsx-attribute-face=0A+=20=20'((t=20.=20= (:inherit=20font-lock-constant-face)))=0A+=20=20"Face=20for=20HTML=20= attributes=20like=20name=20and=20id=20in=20JSX.")=0A+=0A=20(defvar=20= typescript-ts-mode--syntax-table=0A=20=20=20(let=20((table=20= (make-syntax-table)))=0A=20=20=20=20=20;;=20Taken=20from=20the=20= cc-langs=20version=0A@@=20-284,17=20+292,17=20@@=20= typescript-ts-mode--font-lock-settings=0A=20=20=20=20:feature=20'jsx=0A=20= =20=20=20`((jsx_opening_element=0A=20=20=20=20=20=20=20= [(nested_identifier=20(identifier))=20(identifier)]=0A-=20=20=20=20=20=20= @font-lock-function-call-face)=0A+=20=20=20=20=20=20= @typescript-ts-jsx-tag-face)=0A=20=0A=20=20=20=20=20=20= (jsx_closing_element=0A=20=20=20=20=20=20=20[(nested_identifier=20= (identifier))=20(identifier)]=0A-=20=20=20=20=20=20= @font-lock-function-call-face)=0A+=20=20=20=20=20=20= @typescript-ts-jsx-tag-face)=0A=20=0A=20=20=20=20=20=20= (jsx_self_closing_element=0A=20=20=20=20=20=20=20[(nested_identifier=20= (identifier))=20(identifier)]=0A-=20=20=20=20=20=20= @font-lock-function-call-face)=0A+=20=20=20=20=20=20= @typescript-ts-jsx-tag-face)=0A=20=0A-=20=20=20=20=20(jsx_attribute=20= (property_identifier)=20@font-lock-constant-face))=0A+=20=20=20=20=20= (jsx_attribute=20(property_identifier)=20= @typescript-ts-jsx-attribute-face))=0A=20=0A=20=20=20=20:language=20= language=0A=20=20=20=20:feature=20'number=0A--=20=0A2.33.1=0A=0A= --Apple-Mail=_36B1A9E6-C68B-42E6-A750-6BFFD67864A6--