From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Damien Cassou Newsgroups: gmane.emacs.bugs Subject: bug#72069: [PATCH] Move configuration of auto-mode-alist out of js-ts-mode Date: Fri, 12 Jul 2024 09:58:45 +0200 Message-ID: <87ed7zca8a.fsf@cassou.me> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="38639"; mail-complaints-to="usenet@ciao.gmane.io" To: 72069@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Fri Jul 12 10:00:28 2024 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 1sSBCe-0009ni-3m for geb-bug-gnu-emacs@m.gmane-mx.org; Fri, 12 Jul 2024 10:00:28 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1sSBCH-0006XI-D5; Fri, 12 Jul 2024 04:00: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 1sSBCF-0006VX-Es for bug-gnu-emacs@gnu.org; Fri, 12 Jul 2024 04:00:03 -0400 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 1sSBCE-0005lA-Ih for bug-gnu-emacs@gnu.org; Fri, 12 Jul 2024 04:00:03 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1sSBCE-0003co-Cz for bug-gnu-emacs@gnu.org; Fri, 12 Jul 2024 04:00:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Damien Cassou Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 12 Jul 2024 08:00:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 72069 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.172077114913839 (code B ref -1); Fri, 12 Jul 2024 08:00:02 +0000 Original-Received: (at submit) by debbugs.gnu.org; 12 Jul 2024 07:59:09 +0000 Original-Received: from localhost ([127.0.0.1]:53133 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sSBBM-0003b9-Km for submit@debbugs.gnu.org; Fri, 12 Jul 2024 03:59:08 -0400 Original-Received: from lists.gnu.org ([209.51.188.17]:33858) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sSBBJ-0003az-DJ for submit@debbugs.gnu.org; Fri, 12 Jul 2024 03:59:07 -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 1sSBBJ-0006Qt-0v for bug-gnu-emacs@gnu.org; Fri, 12 Jul 2024 03:59:05 -0400 Original-Received: from mail.reprendre.net ([2001:910:1410:501::1]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1sSBB6-0004z3-14 for bug-gnu-emacs@gnu.org; Fri, 12 Jul 2024 03:58:58 -0400 Original-Received: from [127.0.0.1] (localhost [127.0.0.1]) by localhost (Mailerdaemon) with ESMTPSA id 001252C0B5E for ; Fri, 12 Jul 2024 09:58:46 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cassou.me; s=dkim; t=1720771127; h=from:subject:date:message-id:to:mime-version:content-type; bh=EUuq5MTsKCqkPnSrhb5aueejuyVUZ6GNOm8BPge8fuU=; b=Pl1CRhoMTL/QNo/wtcTDG53jN8xZZExDqhVdiErcr0exuhEII4rwwqO8eDdE4cV54iDa5x eizK4VX6tO0kBFH4s4Mj1GjbuG+AyNAoyJKGIO1QUoG9/ZR4lVgNxGeS3QTzLIC+Qdomuk 5I8POroCvT0JqNp6eM2C7daG6Wsw2FcsJjnO8FpIFIGb67XCLESXEp1N9ssrZDuyeExIxj mifeukn3x0LsoaYrHIfq6R6ELMN4odwJYAwehad6l5/iES3rWSkUy3sjrU6bjc34p4Ecxp Yu5aD1yjxDH3Hyrp02EuVyqig84WOnh4H5a/RkSmOOXtKVbDUPap/a8e+c8oVQ== X-Last-TLS-Session-Version: TLSv1.3 Received-SPF: pass client-ip=2001:910:1410:501::1; envelope-from=damien@cassou.me; helo=mail.reprendre.net 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, SPF_HELO_PASS=-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:288766 Archived-At: --=-=-= Content-Type: text/plain Tags: patch Hi, The current version of the code requires the `js-ts-mode' function to have already been executed for `auto-mode-alist' to contain an entry for ".jsx" files. The patch makes sure that `auto-mode-alist' is updates when js.el is loaded. Best -- Damien Cassou "Success is the ability to go from one failure to another without losing enthusiasm." --Winston Churchill --=-=-= Content-Type: text/patch Content-Disposition: attachment; filename=0001-Move-configuration-of-auto-mode-alist-out-of-js-ts-m.patch >From 7fc9bb52a9f51a8caf4d5d016dc8a8812dd5c6a3 Mon Sep 17 00:00:00 2001 From: Damien Cassou Date: Fri, 12 Jul 2024 09:50:45 +0200 Subject: [PATCH] Move configuration of auto-mode-alist out of js-ts-mode * lisp/progmodes/js.el (js-ts-mode): Remove configuration of auto-mode-alist. --- lisp/progmodes/js.el | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lisp/progmodes/js.el b/lisp/progmodes/js.el index f8140c14a49..c3e6077a352 100644 --- a/lisp/progmodes/js.el +++ b/lisp/progmodes/js.el @@ -3957,10 +3957,10 @@ js-ts-mode "method_definition") eos) nil nil))) - (treesit-major-mode-setup) + (treesit-major-mode-setup))) - (add-to-list 'auto-mode-alist - '("\\(\\.js[mx]\\|\\.har\\)\\'" . js-ts-mode)))) +(add-to-list 'auto-mode-alist + '("\\(\\.js[mx]\\|\\.har\\)\\'" . js-ts-mode)) (derived-mode-add-parents 'js-ts-mode '(js-mode)) -- 2.45.2 --=-=-=--