X-Loop: help-debbugs@HIDDEN Subject: bug#72069: [PATCH] Move configuration of auto-mode-alist out of js-ts-mode Resent-From: Damien Cassou <damien@HIDDEN> Original-Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> Resent-CC: bug-gnu-emacs@HIDDEN Resent-Date: Fri, 12 Jul 2024 08:00:02 +0000 Resent-Message-ID: <handler.72069.B.172077114913839 <at> debbugs.gnu.org> Resent-Sender: help-debbugs@HIDDEN X-GNU-PR-Message: report 72069 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch To: 72069 <at> debbugs.gnu.org X-Debbugs-Original-To: bug-gnu-emacs@HIDDEN Received: via spool by submit <at> debbugs.gnu.org id=B.172077114913839 (code B ref -1); Fri, 12 Jul 2024 08:00:02 +0000 Received: (at submit) by debbugs.gnu.org; 12 Jul 2024 07:59:09 +0000 Received: from localhost ([127.0.0.1]:53133 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>) id 1sSBBM-0003b9-Km for submit <at> debbugs.gnu.org; Fri, 12 Jul 2024 03:59:08 -0400 Received: from lists.gnu.org ([209.51.188.17]:33858) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <damien@HIDDEN>) id 1sSBBJ-0003az-DJ for submit <at> debbugs.gnu.org; Fri, 12 Jul 2024 03:59:07 -0400 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 <damien@HIDDEN>) id 1sSBBJ-0006Qt-0v for bug-gnu-emacs@HIDDEN; Fri, 12 Jul 2024 03:59:05 -0400 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 <damien@HIDDEN>) id 1sSBB6-0004z3-14 for bug-gnu-emacs@HIDDEN; Fri, 12 Jul 2024 03:58:58 -0400 Received: from [127.0.0.1] (localhost [127.0.0.1]) by localhost (Mailerdaemon) with ESMTPSA id 001252C0B5E for <bug-gnu-emacs@HIDDEN>; 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== From: Damien Cassou <damien@HIDDEN> Date: Fri, 12 Jul 2024 09:58:45 +0200 Message-ID: <87ed7zca8a.fsf@HIDDEN> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-Last-TLS-Session-Version: TLSv1.3 Received-SPF: pass client-ip=2001:910:1410:501::1; envelope-from=damien@HIDDEN; 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-Spam-Score: -1.3 (-) X-BeenThere: debbugs-submit <at> debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: <debbugs-submit.debbugs.gnu.org> List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe> List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/> List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org> List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help> List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe> Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> X-Spam-Score: -2.3 (--) --=-=-= 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 <damien@HIDDEN> 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 --=-=-=--
Content-Disposition: inline Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-Mailer: MIME-tools 5.505 (Entity 5.505) Content-Type: text/plain; charset=utf-8 X-Loop: help-debbugs@HIDDEN From: help-debbugs@HIDDEN (GNU bug Tracking System) To: Damien Cassou <damien@HIDDEN> Subject: bug#72069: Acknowledgement ([PATCH] Move configuration of auto-mode-alist out of js-ts-mode) Message-ID: <handler.72069.B.172077114913839.ack <at> debbugs.gnu.org> References: <87ed7zca8a.fsf@HIDDEN> X-Gnu-PR-Message: ack 72069 X-Gnu-PR-Package: emacs X-Gnu-PR-Keywords: patch Reply-To: 72069 <at> debbugs.gnu.org Date: Fri, 12 Jul 2024 08:00:02 +0000 Thank you for filing a new bug report with debbugs.gnu.org. This is an automatically generated reply to let you know your message has been received. Your message is being forwarded to the package maintainers and other interested parties for their attention; they will reply in due course. Your message has been sent to the package maintainer(s): bug-gnu-emacs@HIDDEN If you wish to submit further information on this problem, please send it to 72069 <at> debbugs.gnu.org. Please do not send mail to help-debbugs@HIDDEN unless you wish to report a problem with the Bug-tracking system. --=20 72069: https://debbugs.gnu.org/cgi/bugreport.cgi?bug=3D72069 GNU Bug Tracking System Contact help-debbugs@HIDDEN with problems
X-Loop: help-debbugs@HIDDEN Subject: bug#72069: [PATCH] Move configuration of auto-mode-alist out of js-ts-mode Resent-From: Stefan Kangas <stefankangas@HIDDEN> Original-Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> Resent-CC: bug-gnu-emacs@HIDDEN Resent-Date: Wed, 24 Jul 2024 14:08:02 +0000 Resent-Message-ID: <handler.72069.B72069.172183003324641 <at> debbugs.gnu.org> Resent-Sender: help-debbugs@HIDDEN X-GNU-PR-Message: followup 72069 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch To: Damien Cassou <damien@HIDDEN> Cc: Yuan Fu <casouri@HIDDEN>, 72069 <at> debbugs.gnu.org Received: via spool by 72069-submit <at> debbugs.gnu.org id=B72069.172183003324641 (code B ref 72069); Wed, 24 Jul 2024 14:08:02 +0000 Received: (at 72069) by debbugs.gnu.org; 24 Jul 2024 14:07:13 +0000 Received: from localhost ([127.0.0.1]:34273 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>) id 1sWce9-0006PM-0I for submit <at> debbugs.gnu.org; Wed, 24 Jul 2024 10:07:13 -0400 Received: from mail-lj1-f176.google.com ([209.85.208.176]:45250) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <stefankangas@HIDDEN>) id 1sWce5-0006P6-MU for 72069 <at> debbugs.gnu.org; Wed, 24 Jul 2024 10:07:11 -0400 Received: by mail-lj1-f176.google.com with SMTP id 38308e7fff4ca-2f01e9f53ebso25013161fa.2 for <72069 <at> debbugs.gnu.org>; Wed, 24 Jul 2024 07:07:03 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1721829957; x=1722434757; darn=debbugs.gnu.org; h=cc:to:subject:message-id:date:mime-version:references:in-reply-to :from:from:to:cc:subject:date:message-id:reply-to; bh=CnhU+rBxVCpEMKFPg4rR1fTzrzx9PvhvjT3ZgPeMMow=; b=aP+8JIspChaPfnfg4DL4tsLJgAx83lW8xxE2GgR3yzMS11ZXq8tqlC2EGXC3zYTOgV odBQPIrFQXViN33T8j9tgn3L5gxV3eqd5usGJ/lUs0lVjBh9dyDAscCN53tuvSP4zchD ktgwCVVYRzr24Iv1R3ZjbcUSIGrOlQY3836K+HJSNlS3VGBxNacktm2lD7sSXGD33LNu 68/Aw6Dkm+nAzvveQ5iQ5zGl1DwQQtWKQN56w8tsCgL5LX/v6qt6Z8OOekcCsAQAIuDJ 5/N4awetRX58EET5A3uFLP1k5PkI1HzvXJvHv3tgFkf49G6eFhvDKskKgCTbktco0LWi K3bg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1721829957; x=1722434757; h=cc:to:subject:message-id:date:mime-version:references:in-reply-to :from:x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=CnhU+rBxVCpEMKFPg4rR1fTzrzx9PvhvjT3ZgPeMMow=; b=B+1L6+819FHmxvHS5W5JEKxg5oq0Ne7akrtlXy5oMx7w4oEM7NKiA/Z+VSVCfoJ5EH /axYm5ZvBBALHDTyauWal2LDjbaYLY6eWitAjmdZbs+NdcmPpRTuz9v4YuywUHAqV9AX D4B2XL6cYQv+SRFtOreeCf9K7uctQ5pkQ+n6XU5BHRemH6RbWmkId76fW/dTu77fuzXd BNym9+JEquW3JZBk0rr0uK8Jhm1mmzYE6zWTdMZLoL3WAmxhDDn+Qu+dfwSbfJMAQqnY QRTW8R+oUf848PvRv/1IlOpPpdpkk4XyqD713xLxKhSe1SYuVuTCCMoDeo2QfLHPIjwm jOvw== X-Gm-Message-State: AOJu0YzfC5cSIMaMekmp1L/rCREuMrJHY/ds3nyQ6/hGTSO9zMm9zuyS z8kmw3eg7NMvBQ0gLEkU5QN/kou2modcK5Sgdu1DTQAfts7uYBCyhT/J8kJv21+SKmc2Ak7z/FB HiEjCHTtQ1GGAgqriczOh8zMGh0w= X-Google-Smtp-Source: AGHT+IGHKk7axM6kfuEQWt7qe/huLnmBF81PiaZv34r2mUcr8O7RRbizf367tUxnn1MJDIt1rrHR5lHgEH8KKLHU/eg= X-Received: by 2002:a2e:9d92:0:b0:2ee:7a54:3b08 with SMTP id 38308e7fff4ca-2f0324dd6e7mr17060361fa.3.1721829956919; Wed, 24 Jul 2024 07:05:56 -0700 (PDT) Received: from 753933720722 named unknown by gmailapi.google.com with HTTPREST; Wed, 24 Jul 2024 07:05:55 -0700 From: Stefan Kangas <stefankangas@HIDDEN> In-Reply-To: <87ed7zca8a.fsf@HIDDEN> (Damien Cassou's message of "Fri, 12 Jul 2024 09:58:45 +0200") References: <87ed7zca8a.fsf@HIDDEN> MIME-Version: 1.0 Date: Wed, 24 Jul 2024 07:05:55 -0700 Message-ID: <CADwFkmnUm17tEPnryO8U_1hTGSJvqRA+5K413uhLsLrFxosLTA@HIDDEN> Content-Type: text/plain; charset="UTF-8" X-Spam-Score: 0.0 (/) X-BeenThere: debbugs-submit <at> debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: <debbugs-submit.debbugs.gnu.org> List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe> List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/> List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org> List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help> List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe> Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> X-Spam-Score: -1.0 (-) Damien Cassou <damien@HIDDEN> writes: > 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. Thanks for the patch. What about js-mode? Shouldn't that be used out-of-the-box for these files? >>From 7fc9bb52a9f51a8caf4d5d016dc8a8812dd5c6a3 Mon Sep 17 00:00:00 2001 > From: Damien Cassou <damien@HIDDEN> > 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)) Shouldn't this be wrapped in (if (treesit-ready-p js) ...) ? > > (derived-mode-add-parents 'js-ts-mode '(js-mode))
X-Loop: help-debbugs@HIDDEN Subject: bug#72069: [PATCH] Move configuration of auto-mode-alist out of js-ts-mode Resent-From: Damien Cassou <damien@HIDDEN> Original-Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> Resent-CC: bug-gnu-emacs@HIDDEN Resent-Date: Mon, 29 Jul 2024 18:21:01 +0000 Resent-Message-ID: <handler.72069.B72069.172227723311784 <at> debbugs.gnu.org> Resent-Sender: help-debbugs@HIDDEN X-GNU-PR-Message: followup 72069 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch To: Stefan Kangas <stefankangas@HIDDEN> Cc: Yuan Fu <casouri@HIDDEN>, 72069 <at> debbugs.gnu.org Received: via spool by 72069-submit <at> debbugs.gnu.org id=B72069.172227723311784 (code B ref 72069); Mon, 29 Jul 2024 18:21:01 +0000 Received: (at 72069) by debbugs.gnu.org; 29 Jul 2024 18:20:33 +0000 Received: from localhost ([127.0.0.1]:46319 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>) id 1sYUz2-00033z-Jg for submit <at> debbugs.gnu.org; Mon, 29 Jul 2024 14:20:32 -0400 Received: from mail.reprendre.net ([193.23.30.35]:43800) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <damien@HIDDEN>) id 1sYUz0-00033q-0b for 72069 <at> debbugs.gnu.org; Mon, 29 Jul 2024 14:20:31 -0400 Received: from [127.0.0.1] (localhost [127.0.0.1]) by localhost (Mailerdaemon) with ESMTPSA id E58E42C0B56; Mon, 29 Jul 2024 20:20:13 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cassou.me; s=dkim; t=1722277214; h=from:subject:date:message-id:to:cc:mime-version:content-type: in-reply-to:references; bh=QwEl3zdvbF6mB1E1HVG7/Kc7+CONz5OhLZoTQVRP7+M=; b=jAQ26U84Wz25HI3dyyz6kYYAfDIQKNy1mLRqNuqVWDxZgNMSmGGlF6wwj5yT/GcHoLetOd yGMzbNGtRNEf+qayT2UCB7uybnyar2e4pOXTuJbLc63o1ZnXw4DWcYiXWofScalMiNa4rZ R4Rq+DXiJ81qhiEnV3/AASNDcxgFjRLa0eKqUbJ7ZMphnwbeQl+EQgYgpn+F6JnzCy94SJ iEmLanZgho+3aBkNPcdbyb9EQw0Ddjl/85fS+Ot/DR8/dlah7q+MjzvSyNIUfqaTYyiKQl f5L1pKYuVePwWWI7Y7YuJQy8TdkSAI7BMHEEMYp9IRWxleQLLSx+1aN+LN7HUA== From: Damien Cassou <damien@HIDDEN> In-Reply-To: <CADwFkmnUm17tEPnryO8U_1hTGSJvqRA+5K413uhLsLrFxosLTA@HIDDEN> References: <87ed7zca8a.fsf@HIDDEN> <CADwFkmnUm17tEPnryO8U_1hTGSJvqRA+5K413uhLsLrFxosLTA@HIDDEN> Date: Mon, 29 Jul 2024 20:20:12 +0200 Message-ID: <87a5i0oyar.fsf@HIDDEN> MIME-Version: 1.0 Content-Type: text/plain X-Last-TLS-Session-Version: TLSv1.3 X-Spam-Score: -0.0 (/) X-BeenThere: debbugs-submit <at> debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: <debbugs-submit.debbugs.gnu.org> List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe> List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/> List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org> List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help> List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe> Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> X-Spam-Score: -1.0 (-) Hi Stefan, thank you very much for your review. Stefan Kangas <stefankangas@HIDDEN> writes: > Damien Cassou <damien@HIDDEN> writes: > What about js-mode? Shouldn't that be used out-of-the-box for these files? Definitely, I don't know what I was thinking. I'm not sure there is anything to save on this patch. If you believe I should wrap the call to `add-to-list' within a `(if (treesit-ready-p js) ...)' block I will do that but I don't think this is how things are done for other kinds of files. Otherwise, feel free to close this ticket and please forgive me. Best >>>From 7fc9bb52a9f51a8caf4d5d016dc8a8812dd5c6a3 Mon Sep 17 00:00:00 2001 >> From: Damien Cassou <damien@HIDDEN> >> 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)) > > Shouldn't this be wrapped in > > (if (treesit-ready-p js) ...) > > ? > >> >> (derived-mode-add-parents 'js-ts-mode '(js-mode)) -- Damien Cassou "Success is the ability to go from one failure to another without losing enthusiasm." --Winston Churchill
MIME-Version: 1.0 X-Mailer: MIME-tools 5.505 (Entity 5.505) X-Loop: help-debbugs@HIDDEN From: help-debbugs@HIDDEN (GNU bug Tracking System) To: Stefan Kangas <stefankangas@HIDDEN> Subject: bug#72069: closed ([PATCH] Move configuration of auto-mode-alist out of js-ts-mode) CC: tracker <at> debbugs.gnu.org Message-ID: <handler.72069.D72069.173930239927571.ackdone <at> debbugs.gnu.org> References: <CADwFkmkdmCi-ia_CDkAdymOdmvpziSELJMbZqEn6=qDUq9wi_w@HIDDEN> <87ed7zca8a.fsf@HIDDEN> X-Gnu-PR-Message: closed 72069 X-Gnu-PR-Package: emacs X-Gnu-PR-Keywords: patch Date: Tue, 11 Feb 2025 19:34:02 +0000 Content-Type: multipart/mixed; boundary="----------=_1739302442-27642-0" This is a multi-part message in MIME format... ------------=_1739302442-27642-0 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=utf-8 Your message dated Tue, 11 Feb 2025 11:33:09 -0800 with message-id <CADwFkmkdmCi-ia_CDkAdymOdmvpziSELJMbZqEn6=3DqDUq9wi_w@mail= .gmail.com> and subject line Re: bug#72069: [PATCH] Move configuration of auto-mode-ali= st out of js-ts-mode has caused the debbugs.gnu.org bug report #72069, regarding [PATCH] Move configuration of auto-mode-alist out of js-ts-mode to be marked as done. (If you believe you have received this mail in error, please contact help-debbugs@HIDDEN) --=20 72069: https://debbugs.gnu.org/cgi/bugreport.cgi?bug=3D72069 GNU Bug Tracking System Contact help-debbugs@HIDDEN with problems ------------=_1739302442-27642-0 Content-Type: message/rfc822 Content-Disposition: inline Content-Transfer-Encoding: 7bit Received: (at submit) by debbugs.gnu.org; 12 Jul 2024 07:59:09 +0000 Received: from localhost ([127.0.0.1]:53133 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>) id 1sSBBM-0003b9-Km for submit <at> debbugs.gnu.org; Fri, 12 Jul 2024 03:59:08 -0400 Received: from lists.gnu.org ([209.51.188.17]:33858) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <damien@HIDDEN>) id 1sSBBJ-0003az-DJ for submit <at> debbugs.gnu.org; Fri, 12 Jul 2024 03:59:07 -0400 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 <damien@HIDDEN>) id 1sSBBJ-0006Qt-0v for bug-gnu-emacs@HIDDEN; Fri, 12 Jul 2024 03:59:05 -0400 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 <damien@HIDDEN>) id 1sSBB6-0004z3-14 for bug-gnu-emacs@HIDDEN; Fri, 12 Jul 2024 03:58:58 -0400 Received: from [127.0.0.1] (localhost [127.0.0.1]) by localhost (Mailerdaemon) with ESMTPSA id 001252C0B5E for <bug-gnu-emacs@HIDDEN>; 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== From: Damien Cassou <damien@HIDDEN> To: bug-gnu-emacs@HIDDEN Subject: [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@HIDDEN> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-Last-TLS-Session-Version: TLSv1.3 Received-SPF: pass client-ip=2001:910:1410:501::1; envelope-from=damien@HIDDEN; 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-Spam-Score: -1.3 (-) X-Debbugs-Envelope-To: submit X-BeenThere: debbugs-submit <at> debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: <debbugs-submit.debbugs.gnu.org> List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe> List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/> List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org> List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help> List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe> Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> X-Spam-Score: -2.3 (--) --=-=-= 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 <damien@HIDDEN> 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 --=-=-=-- ------------=_1739302442-27642-0 Content-Type: message/rfc822 Content-Disposition: inline Content-Transfer-Encoding: 7bit Received: (at 72069-done) by debbugs.gnu.org; 11 Feb 2025 19:33:19 +0000 Received: from localhost ([127.0.0.1]:58737 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>) id 1thw0U-0007Ad-SH for submit <at> debbugs.gnu.org; Tue, 11 Feb 2025 14:33:19 -0500 Received: from mail-ed1-x529.google.com ([2a00:1450:4864:20::529]:47110) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.84_2) (envelope-from <stefankangas@HIDDEN>) id 1thw0S-0007AI-7D for 72069-done <at> debbugs.gnu.org; Tue, 11 Feb 2025 14:33:16 -0500 Received: by mail-ed1-x529.google.com with SMTP id 4fb4d7f45d1cf-5de4a8b4f86so7044538a12.2 for <72069-done <at> debbugs.gnu.org>; Tue, 11 Feb 2025 11:33:16 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1739302390; x=1739907190; darn=debbugs.gnu.org; h=cc:to:subject:message-id:date:mime-version:references:in-reply-to :from:from:to:cc:subject:date:message-id:reply-to; bh=C8rKQVmE1DTdFH3t8joEXNHeR0vfLr4nQobijkuabeg=; b=jkOwLTVdJ4qECjgar15AAY6Y1FUlNUox3tHtrG+Ns1L3BuImamQT5htIuxJ7TDjKgW cGT4JEjQ/Go++hczTx7eZDGDebc8falFRiqO+N3Qn0FysqHvh4hoQLoEN8FN+//HY1w+ cx4bR6ygXa6Wq67nhVNMdwQTkV2lh+lrw3HJOCGKzceBWDURUn+dc58y7gFrpl3VJCkw u5WW+M8gvSWjry9m/BARrr4RE9VJzqb3ppk9ArFaaQKTxu6u4BsLke3lAtY5WRqw3K2Z vhi9lBiYIjccA39fQMM5HBZq0jKI7jT0BDcSbT6m2tMAClpeBpbwSWKInwhfwGTnZGBr LCYA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1739302390; x=1739907190; h=cc:to:subject:message-id:date:mime-version:references:in-reply-to :from:x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=C8rKQVmE1DTdFH3t8joEXNHeR0vfLr4nQobijkuabeg=; b=KlxhReghsKrn0/v+DcoMFnLGuHHpcggxTN++eRvGitlrqyrUbT9ywGLX9VfXt4v0nI Wht1MoF6sYkIs4rgi1DYK5P2hnreOM+BvAiQ+bvtJPFiw8a/GSxxldNf/iM02xbkjA7G fsOpnh++rypoyP9F/suPmqhz4iLnbwO3d3RaMHIvRPErabslnAiimbznRuhCOvgZPRdc H9RQ5Ir+55s4UK/nG4mdncgS1hg5HA6uoW3YH13y/eJ/rh9qp1rGtXEzHrE6KBLQLEat UOmk+YOmmdcDn/8v05Pvo+EEDJQR5yFbsMX1DfdDoRZDb4sXgkAgDw+AwL2GLLwBsFxf zqKg== X-Forwarded-Encrypted: i=1; AJvYcCWSztndUkZqyGJsKXXoupGlYA5hOOa0sVo9pUcWhHd5XdIQs073jIotRPwZCIWfe5xIvrdT6avU8SVG <at> debbugs.gnu.org X-Gm-Message-State: AOJu0YxpecY88GRP67K9WhV+9B4cGNwYS6xHHJ1g2sgV82jcKiyLAt54 oVp3ITa4sW5U5GL5Kko0b0vUe81vrS6F4UHroXTpu4L1oTLVimmWsr/wFLJU0JRx5zIhuWP78Ls UuhmqRtE19k5GwHXDXq4iS0HvwuM= X-Gm-Gg: ASbGnctR5pXyU3eEvSowEFp7Cm8l1u9Hzo21gzWtLrTCWED/CYytnfuCXZa9myTdMWK Pgm876WJYXivh2J/AKutbnoLHNXQgIGjF8UYKOD3IDxF53Su6CXVsvwy1zm6THP4TyccoG8Z9JA == X-Google-Smtp-Source: AGHT+IElwj+IfKePXy+munC2AW/G08ZgHxsEqRMyOYEufxG5dsXuGlLCihPnuJhaKvwk+SjSy5PyfihN67Hh9CMccBU= X-Received: by 2002:a05:6402:26c9:b0:5dc:1ec6:12bc with SMTP id 4fb4d7f45d1cf-5deade00874mr374437a12.28.1739302389936; Tue, 11 Feb 2025 11:33:09 -0800 (PST) Received: from 753933720722 named unknown by gmailapi.google.com with HTTPREST; Tue, 11 Feb 2025 11:33:09 -0800 From: Stefan Kangas <stefankangas@HIDDEN> In-Reply-To: <87a5i0oyar.fsf@HIDDEN> References: <87ed7zca8a.fsf@HIDDEN> <CADwFkmnUm17tEPnryO8U_1hTGSJvqRA+5K413uhLsLrFxosLTA@HIDDEN> <87a5i0oyar.fsf@HIDDEN> MIME-Version: 1.0 Date: Tue, 11 Feb 2025 11:33:09 -0800 X-Gm-Features: AWEUYZmdBmEvBXVIGVqGMnZL0OPStVLLuNfYlWZrvg1wlzt58LDfdl26nqmmuds Message-ID: <CADwFkmkdmCi-ia_CDkAdymOdmvpziSELJMbZqEn6=qDUq9wi_w@HIDDEN> Subject: Re: bug#72069: [PATCH] Move configuration of auto-mode-alist out of js-ts-mode To: Damien Cassou <damien@HIDDEN> Content-Type: text/plain; charset="UTF-8" X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 72069-done Cc: Yuan Fu <casouri@HIDDEN>, 72069-done <at> debbugs.gnu.org X-BeenThere: debbugs-submit <at> debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: <debbugs-submit.debbugs.gnu.org> List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe> List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/> List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org> List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help> List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe> Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> X-Spam-Score: -1.0 (-) Damien Cassou <damien@HIDDEN> writes: > Hi Stefan, > > thank you very much for your review. > > Stefan Kangas <stefankangas@HIDDEN> writes: >> Damien Cassou <damien@HIDDEN> writes: >> What about js-mode? Shouldn't that be used out-of-the-box for these files? > > > Definitely, I don't know what I was thinking. I'm not sure there is > anything to save on this patch. > > If you believe I should wrap the call to `add-to-list' within a `(if > (treesit-ready-p js) ...)' block I will do that but I don't think this > is how things are done for other kinds of files. Otherwise, feel free to > close this ticket and please forgive me. OK, thanks, so I'm closing this bug now. ------------=_1739302442-27642-0--
MIME-Version: 1.0 X-Mailer: MIME-tools 5.505 (Entity 5.505) X-Loop: help-debbugs@HIDDEN From: help-debbugs@HIDDEN (GNU bug Tracking System) To: Damien Cassou <damien@HIDDEN> Subject: bug#72069: closed (Re: bug#72069: [PATCH] Move configuration of auto-mode-alist out of js-ts-mode) Message-ID: <handler.72069.D72069.173930239927571.notifdone <at> debbugs.gnu.org> References: <CADwFkmkdmCi-ia_CDkAdymOdmvpziSELJMbZqEn6=qDUq9wi_w@HIDDEN> <87ed7zca8a.fsf@HIDDEN> X-Gnu-PR-Message: they-closed 72069 X-Gnu-PR-Package: emacs X-Gnu-PR-Keywords: patch Reply-To: 72069 <at> debbugs.gnu.org Date: Tue, 11 Feb 2025 19:34:02 +0000 Content-Type: multipart/mixed; boundary="----------=_1739302442-27642-1" This is a multi-part message in MIME format... ------------=_1739302442-27642-1 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" Your bug report #72069: [PATCH] Move configuration of auto-mode-alist out of js-ts-mode which was filed against the emacs package, has been closed. The explanation is attached below, along with your original report. If you require more details, please reply to 72069 <at> debbugs.gnu.org. --=20 72069: https://debbugs.gnu.org/cgi/bugreport.cgi?bug=3D72069 GNU Bug Tracking System Contact help-debbugs@HIDDEN with problems ------------=_1739302442-27642-1 Content-Type: message/rfc822 Content-Disposition: inline Content-Transfer-Encoding: 7bit Received: (at 72069-done) by debbugs.gnu.org; 11 Feb 2025 19:33:19 +0000 Received: from localhost ([127.0.0.1]:58737 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>) id 1thw0U-0007Ad-SH for submit <at> debbugs.gnu.org; Tue, 11 Feb 2025 14:33:19 -0500 Received: from mail-ed1-x529.google.com ([2a00:1450:4864:20::529]:47110) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.84_2) (envelope-from <stefankangas@HIDDEN>) id 1thw0S-0007AI-7D for 72069-done <at> debbugs.gnu.org; Tue, 11 Feb 2025 14:33:16 -0500 Received: by mail-ed1-x529.google.com with SMTP id 4fb4d7f45d1cf-5de4a8b4f86so7044538a12.2 for <72069-done <at> debbugs.gnu.org>; Tue, 11 Feb 2025 11:33:16 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1739302390; x=1739907190; darn=debbugs.gnu.org; h=cc:to:subject:message-id:date:mime-version:references:in-reply-to :from:from:to:cc:subject:date:message-id:reply-to; bh=C8rKQVmE1DTdFH3t8joEXNHeR0vfLr4nQobijkuabeg=; b=jkOwLTVdJ4qECjgar15AAY6Y1FUlNUox3tHtrG+Ns1L3BuImamQT5htIuxJ7TDjKgW cGT4JEjQ/Go++hczTx7eZDGDebc8falFRiqO+N3Qn0FysqHvh4hoQLoEN8FN+//HY1w+ cx4bR6ygXa6Wq67nhVNMdwQTkV2lh+lrw3HJOCGKzceBWDURUn+dc58y7gFrpl3VJCkw u5WW+M8gvSWjry9m/BARrr4RE9VJzqb3ppk9ArFaaQKTxu6u4BsLke3lAtY5WRqw3K2Z vhi9lBiYIjccA39fQMM5HBZq0jKI7jT0BDcSbT6m2tMAClpeBpbwSWKInwhfwGTnZGBr LCYA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1739302390; x=1739907190; h=cc:to:subject:message-id:date:mime-version:references:in-reply-to :from:x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=C8rKQVmE1DTdFH3t8joEXNHeR0vfLr4nQobijkuabeg=; b=KlxhReghsKrn0/v+DcoMFnLGuHHpcggxTN++eRvGitlrqyrUbT9ywGLX9VfXt4v0nI Wht1MoF6sYkIs4rgi1DYK5P2hnreOM+BvAiQ+bvtJPFiw8a/GSxxldNf/iM02xbkjA7G fsOpnh++rypoyP9F/suPmqhz4iLnbwO3d3RaMHIvRPErabslnAiimbznRuhCOvgZPRdc H9RQ5Ir+55s4UK/nG4mdncgS1hg5HA6uoW3YH13y/eJ/rh9qp1rGtXEzHrE6KBLQLEat UOmk+YOmmdcDn/8v05Pvo+EEDJQR5yFbsMX1DfdDoRZDb4sXgkAgDw+AwL2GLLwBsFxf zqKg== X-Forwarded-Encrypted: i=1; AJvYcCWSztndUkZqyGJsKXXoupGlYA5hOOa0sVo9pUcWhHd5XdIQs073jIotRPwZCIWfe5xIvrdT6avU8SVG <at> debbugs.gnu.org X-Gm-Message-State: AOJu0YxpecY88GRP67K9WhV+9B4cGNwYS6xHHJ1g2sgV82jcKiyLAt54 oVp3ITa4sW5U5GL5Kko0b0vUe81vrS6F4UHroXTpu4L1oTLVimmWsr/wFLJU0JRx5zIhuWP78Ls UuhmqRtE19k5GwHXDXq4iS0HvwuM= X-Gm-Gg: ASbGnctR5pXyU3eEvSowEFp7Cm8l1u9Hzo21gzWtLrTCWED/CYytnfuCXZa9myTdMWK Pgm876WJYXivh2J/AKutbnoLHNXQgIGjF8UYKOD3IDxF53Su6CXVsvwy1zm6THP4TyccoG8Z9JA == X-Google-Smtp-Source: AGHT+IElwj+IfKePXy+munC2AW/G08ZgHxsEqRMyOYEufxG5dsXuGlLCihPnuJhaKvwk+SjSy5PyfihN67Hh9CMccBU= X-Received: by 2002:a05:6402:26c9:b0:5dc:1ec6:12bc with SMTP id 4fb4d7f45d1cf-5deade00874mr374437a12.28.1739302389936; Tue, 11 Feb 2025 11:33:09 -0800 (PST) Received: from 753933720722 named unknown by gmailapi.google.com with HTTPREST; Tue, 11 Feb 2025 11:33:09 -0800 From: Stefan Kangas <stefankangas@HIDDEN> In-Reply-To: <87a5i0oyar.fsf@HIDDEN> References: <87ed7zca8a.fsf@HIDDEN> <CADwFkmnUm17tEPnryO8U_1hTGSJvqRA+5K413uhLsLrFxosLTA@HIDDEN> <87a5i0oyar.fsf@HIDDEN> MIME-Version: 1.0 Date: Tue, 11 Feb 2025 11:33:09 -0800 X-Gm-Features: AWEUYZmdBmEvBXVIGVqGMnZL0OPStVLLuNfYlWZrvg1wlzt58LDfdl26nqmmuds Message-ID: <CADwFkmkdmCi-ia_CDkAdymOdmvpziSELJMbZqEn6=qDUq9wi_w@HIDDEN> Subject: Re: bug#72069: [PATCH] Move configuration of auto-mode-alist out of js-ts-mode To: Damien Cassou <damien@HIDDEN> Content-Type: text/plain; charset="UTF-8" X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 72069-done Cc: Yuan Fu <casouri@HIDDEN>, 72069-done <at> debbugs.gnu.org X-BeenThere: debbugs-submit <at> debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: <debbugs-submit.debbugs.gnu.org> List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe> List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/> List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org> List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help> List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe> Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> X-Spam-Score: -1.0 (-) Damien Cassou <damien@HIDDEN> writes: > Hi Stefan, > > thank you very much for your review. > > Stefan Kangas <stefankangas@HIDDEN> writes: >> Damien Cassou <damien@HIDDEN> writes: >> What about js-mode? Shouldn't that be used out-of-the-box for these files? > > > Definitely, I don't know what I was thinking. I'm not sure there is > anything to save on this patch. > > If you believe I should wrap the call to `add-to-list' within a `(if > (treesit-ready-p js) ...)' block I will do that but I don't think this > is how things are done for other kinds of files. Otherwise, feel free to > close this ticket and please forgive me. OK, thanks, so I'm closing this bug now. ------------=_1739302442-27642-1 Content-Type: message/rfc822 Content-Disposition: inline Content-Transfer-Encoding: 7bit Received: (at submit) by debbugs.gnu.org; 12 Jul 2024 07:59:09 +0000 Received: from localhost ([127.0.0.1]:53133 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>) id 1sSBBM-0003b9-Km for submit <at> debbugs.gnu.org; Fri, 12 Jul 2024 03:59:08 -0400 Received: from lists.gnu.org ([209.51.188.17]:33858) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <damien@HIDDEN>) id 1sSBBJ-0003az-DJ for submit <at> debbugs.gnu.org; Fri, 12 Jul 2024 03:59:07 -0400 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 <damien@HIDDEN>) id 1sSBBJ-0006Qt-0v for bug-gnu-emacs@HIDDEN; Fri, 12 Jul 2024 03:59:05 -0400 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 <damien@HIDDEN>) id 1sSBB6-0004z3-14 for bug-gnu-emacs@HIDDEN; Fri, 12 Jul 2024 03:58:58 -0400 Received: from [127.0.0.1] (localhost [127.0.0.1]) by localhost (Mailerdaemon) with ESMTPSA id 001252C0B5E for <bug-gnu-emacs@HIDDEN>; 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== From: Damien Cassou <damien@HIDDEN> To: bug-gnu-emacs@HIDDEN Subject: [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@HIDDEN> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-Last-TLS-Session-Version: TLSv1.3 Received-SPF: pass client-ip=2001:910:1410:501::1; envelope-from=damien@HIDDEN; 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-Spam-Score: -1.3 (-) X-Debbugs-Envelope-To: submit X-BeenThere: debbugs-submit <at> debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: <debbugs-submit.debbugs.gnu.org> List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe> List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/> List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org> List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help> List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe> Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> X-Spam-Score: -2.3 (--) --=-=-= 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 <damien@HIDDEN> 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 --=-=-=-- ------------=_1739302442-27642-1--
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997 nCipher Corporation Ltd,
1994-97 Ian Jackson.