From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Noah Peart Newsgroups: gmane.emacs.bugs Subject: bug#67730: [PATCH] Add font-locking for shebangs in js-ts-mode and typescript-ts-mode Date: Sat, 9 Dec 2023 11:44:19 -0800 Message-ID: Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="000000000000e943c5060c18edde" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="20305"; mail-complaints-to="usenet@ciao.gmane.io" To: 67730@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sat Dec 09 20:45:07 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 1rC3G7-0005AS-Ll for geb-bug-gnu-emacs@m.gmane-mx.org; Sat, 09 Dec 2023 20:45:07 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rC3Fq-0003iM-6r; Sat, 09 Dec 2023 14:44:50 -0500 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 1rC3Fo-0003hu-Rk for bug-gnu-emacs@gnu.org; Sat, 09 Dec 2023 14:44:48 -0500 Original-Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1rC3Fo-0005Fn-JJ for bug-gnu-emacs@gnu.org; Sat, 09 Dec 2023 14:44:48 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1rC3G2-0004Kn-8e for bug-gnu-emacs@gnu.org; Sat, 09 Dec 2023 14:45:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Noah Peart Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 09 Dec 2023 19:45:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 67730 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch X-Debbugs-Original-To: bug-gnu-emacs@gnu.org Original-Received: via spool by submit@debbugs.gnu.org id=B.170215109816630 (code B ref -1); Sat, 09 Dec 2023 19:45:02 +0000 Original-Received: (at submit) by debbugs.gnu.org; 9 Dec 2023 19:44:58 +0000 Original-Received: from localhost ([127.0.0.1]:48997 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rC3Fy-0004KA-6d for submit@debbugs.gnu.org; Sat, 09 Dec 2023 14:44:58 -0500 Original-Received: from lists.gnu.org ([2001:470:142::17]:60980) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rC3Fw-0004Jv-A5 for submit@debbugs.gnu.org; Sat, 09 Dec 2023 14:44:57 -0500 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 1rC3Fc-0003hE-RM for bug-gnu-emacs@gnu.org; Sat, 09 Dec 2023 14:44:36 -0500 Original-Received: from mail-ot1-x334.google.com ([2607:f8b0:4864:20::334]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1rC3Fa-0004cE-TA for bug-gnu-emacs@gnu.org; Sat, 09 Dec 2023 14:44:36 -0500 Original-Received: by mail-ot1-x334.google.com with SMTP id 46e09a7af769-6d9f7b3de20so884271a34.2 for ; Sat, 09 Dec 2023 11:44:31 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1702151071; x=1702755871; darn=gnu.org; h=to:subject:message-id:date:from:mime-version:from:to:cc:subject :date:message-id:reply-to; bh=0D91ebef/fSCbV3Q4+NQ6mAHa1OPssDbmU1WBCQUKEM=; b=SmQO0/xDZSEpzr/olHitvMNVinEmoaEA6WnmHXvRFVKS8sqV8VWAQWrHHw2lLC+wIj 9+nkicUAtrrlUcZPAqHfBXzXibYPqc+7zhK3F5LBOYkYp9/y36343Dt6bwJFlWwELzBu Vz48ZCNtk1hi3io4myAlh/nfTG+NWOeCSeFOWFOCDTAinvUXpgLHSB3cMLmDkw8uDUO8 hrALFzpysXaH089ewzbKY0ErexvsOGjrIgUQ1enDo6hFjW4Ac+U8feKetR5nx5VU8y3y pBTRjrv9AATh2xRlnC7ghc4n/zzPN0D5dN7T77+UIwmPfwb13ChIPesd3joOue8N63Tz +bpA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1702151071; x=1702755871; h=to:subject:message-id:date:from:mime-version:x-gm-message-state :from:to:cc:subject:date:message-id:reply-to; bh=0D91ebef/fSCbV3Q4+NQ6mAHa1OPssDbmU1WBCQUKEM=; b=FTDtVqGoHlBTOxWw5lMPTg4lsXnSC7fyrmOxR3vCL61DmGB06RCLK5pVWaNjDAQ5Le zbXxL723jSyZaukz7fb4VTKEFDSs3Zx4zWoV6tb6UObreZNEMq5lIWDZV50LL/I+18A4 nlcVkbkUFYvm6kWxSDjwVGtrZVRvytWKbdbTi7kwCzfrnaIsdujl2EGPlFf2K0w7kczH tc/LPPi6s96CFQK2VAr1pybiaeloMzOFy0jh1tMTuf+fh3BNL6E7M2qcr04obS4LNHLM 821MJCY6xKWcDtTYO6QhUBCOhZNEl0VQ2XWpRrlZ4Ssh3biBmwqGLA2eFjSpESt+yuo8 ylsg== X-Gm-Message-State: AOJu0Yzpixr4vBH1pQ8yae/2+xgAw11dZXFVikguAXCfbq7A/t0vLEA9 Bgvr8L6EQXM0ufL5gsicw9gTmJRIVg7i4+pzHXMmiLdKQwuL/awj X-Google-Smtp-Source: AGHT+IF76lmY4yQRnxv2BMO9bv6/JPbOfTFpQ5oXbb1aYwc2HFbW/MwD+mxTZH+klSZl2DzH/mrZkT0pCWWW3TC1fCE= X-Received: by 2002:a05:6871:7518:b0:1fa:fa54:1b83 with SMTP id ny24-20020a056871751800b001fafa541b83mr2485360oac.53.1702151070459; Sat, 09 Dec 2023 11:44:30 -0800 (PST) Received-SPF: pass client-ip=2607:f8b0:4864:20::334; envelope-from=noah.v.peart@gmail.com; helo=mail-ot1-x334.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, HTML_MESSAGE=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 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:275878 Archived-At: --000000000000e943c5060c18edde Content-Type: multipart/alternative; boundary="000000000000e943c3060c18eddc" --000000000000e943c3060c18eddc Content-Type: text/plain; charset="UTF-8" Tags: patch * Bug: `js-ts-mode` and `typescript-ts-mode` are missing font-locking rules for hashbang lines. Recipe to reproduce: Open a buffer and insert #!/usr/bin/env node Run `M-x js-ts-mode` and `M-x typescript-ts-mode` to see no font-locking is applied to the hash bang line. --000000000000e943c3060c18eddc Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
Tags: patch


* Bug: `js-ts-mode` and `typescript= -ts-mode` are missing font-locking
rules for hashbang lines.

Reci= pe to reproduce:
Open a buffer and insert

=C2=A0 =C2=A0 #!/usr/bi= n/env node

Run `M-x js-ts-mode` and `M-x typescript-ts-mode` to see = no font-locking
is applied to the hash bang line.
--000000000000e943c3060c18eddc-- --000000000000e943c5060c18edde Content-Type: text/x-patch; charset="US-ASCII"; name="js-ts-mode-fontify-hash-bang.patch" Content-Disposition: attachment; filename="js-ts-mode-fontify-hash-bang.patch" Content-Transfer-Encoding: base64 Content-ID: X-Attachment-Id: f_lpygpnh30 RnJvbSAxYjE1ZWQxYzg2NTdmODRmNTVmNTc0MTE2ODJlYjM0ZDM5ODQ4NTMzIE1vbiBTZXAgMTcg MDA6MDA6MDAgMjAwMQpGcm9tOiBudmVybm8gPG5vYWgudi5wZWFydEBnbWFpbC5jb20+CkRhdGU6 IFNhdCwgOSBEZWMgMjAyMyAxMToyODoxNSAtMDgwMApTdWJqZWN0OiBbUEFUQ0hdIEFkZCBmb250 LWxvY2tpbmcgZm9yIGhhc2gtYmFuZyBsaW5lcyBpbiBqcy10cy1tb2RlCgoqIGxpc3AvcHJvZ21v ZGVzL2pzLmVsKGpzLS10cmVlc2l0LWZvbnQtbG9jay1zZXR0aW5ncyk6IEFkZCBmb250LWxvY2sg Zm9yIGhhc2ggYmFuZwpsaW5lLgotLS0KIGxpc3AvcHJvZ21vZGVzL2pzLmVsIHwgMiArLQogMSBm aWxlIGNoYW5nZWQsIDEgaW5zZXJ0aW9uKCspLCAxIGRlbGV0aW9uKC0pCgpkaWZmIC0tZ2l0IGEv bGlzcC9wcm9nbW9kZXMvanMuZWwgYi9saXNwL3Byb2dtb2Rlcy9qcy5lbAppbmRleCBiM2EwZjVh N2MwNC4uNDRlZGEwM2Y3Y2UgMTAwNjQ0Ci0tLSBhL2xpc3AvcHJvZ21vZGVzL2pzLmVsCisrKyBi L2xpc3AvcHJvZ21vZGVzL2pzLmVsCkBAIC0zNDk3LDcgKzM0OTcsNyBAQCBqcy0tdHJlZXNpdC1m b250LWxvY2stc2V0dGluZ3MKIAogICAgOmxhbmd1YWdlICdqYXZhc2NyaXB0CiAgICA6ZmVhdHVy ZSAnY29tbWVudAotICAgJygoY29tbWVudCkgQGZvbnQtbG9jay1jb21tZW50LWZhY2UpCisgICAn KFsoY29tbWVudCkgKGhhc2hfYmFuZ19saW5lKV0gQGZvbnQtbG9jay1jb21tZW50LWZhY2UpCiAK ICAgIDpsYW5ndWFnZSAnamF2YXNjcmlwdAogICAgOmZlYXR1cmUgJ2NvbnN0YW50Ci0tIAoyLjM0 LjEKCg== --000000000000e943c5060c18edde Content-Type: text/x-patch; charset="US-ASCII"; name="typescript-ts-mode-fontify-hash-bang.patch" Content-Disposition: attachment; filename="typescript-ts-mode-fontify-hash-bang.patch" Content-Transfer-Encoding: base64 Content-ID: X-Attachment-Id: f_lpygq4251 RnJvbSA2MTllNTQ4ZGM4MTUxMmQyMzljZTRmNzNiNmQzOGEzODEyMDUzOWVhIE1vbiBTZXAgMTcg MDA6MDA6MDAgMjAwMQpGcm9tOiBudmVybm8gPG5vYWgudi5wZWFydEBnbWFpbC5jb20+CkRhdGU6 IFNhdCwgOSBEZWMgMjAyMyAxMTozNTo0NCAtMDgwMApTdWJqZWN0OiBbUEFUQ0hdIEFkZCBmb250 LWxvY2tpbmcgZm9yIGhhc2gtYmFuZyBsaW5lcyBpbiB0eXBlc2NyaXB0LXRzLW1vZGUuCgoqIGxp c3AvcHJvZ21vZGVzL3R5cGVzY3JpcHQtdHMtbW9kZS5lbCh0eXBlc2NyaXB0LXRzLW1vZGUtLWZv bnQtbG9jay1zZXR0aW5ncyk6IEFkZApmb250LWxvY2sgZm9yI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