From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.devel Subject: Re: Make all tree-sitter modes optional Date: Wed, 15 Feb 2023 21:07:53 +0200 Message-ID: <83k00iags6.fsf@gnu.org> References: <83o7rexe2n.fsf@gnu.org> <83h6x5xym7.fsf@gnu.org> <83h6wr6gmz.fsf@gnu.org> <868ri140sr.fsf@mail.linkov.net> <83fsc92gbz.fsf@gnu.org> <83cz6ccagy.fsf@gnu.org> <838rgzaqmj.fsf@gnu.org> Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="39806"; mail-complaints-to="usenet@ciao.gmane.io" Cc: acm@muc.de, juri@linkov.net, casouri@gmail.com, larsi@gnus.org, theo@thornhill.no, jostein@secure.kjonigsen.net, emacs-devel@gnu.org To: Stefan Monnier Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Wed Feb 15 20:08:43 2023 Return-path: Envelope-to: ged-emacs-devel@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 1pSN91-000A6s-6V for ged-emacs-devel@m.gmane-mx.org; Wed, 15 Feb 2023 20:08:43 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pSN8d-00023v-0H; Wed, 15 Feb 2023 14:08:19 -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 1pSN8Z-0001tA-N0 for emacs-devel@gnu.org; Wed, 15 Feb 2023 14:08:15 -0500 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pSN8Y-0003Le-2g; Wed, 15 Feb 2023 14:08:14 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date: mime-version; bh=1h5/T4/3JZtkQLKOreNvwU8mCAJCC7/b5BFb9A+HyAg=; b=PqLFE6DABq5S iZA85RzF1YH5TvDRirOkFWwJ7nYdl9WwKtx8RAKh/IEj6NzMFip1R9wjJIMmHlOAOe2StTuGP22IL RZm5PIhXADpyqA92tMzxbqkULK9d0zgKmz2myhx9Ns6DRijOJHFTs4TuibQho1Z4ooH+LuWBHieOB clqUovyLu++lb6payhSFNx3hFAqoFCN7AfY3HSleCa/A0tW0s3F5lAf2fALBjzM/GRuJC/rHoY8v7 dFZacUA6eXzSQ9yhLCnguof0NArMAzMrU/Sjd3IoEw42V9KNLJhcCkrF4aKzQRvILxXXvSbXmfOq5 yurAULpH94EalbX/Wd2B0Q==; Original-Received: from [87.69.77.57] (helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pSN8X-0006RN-HE; Wed, 15 Feb 2023 14:08:13 -0500 In-Reply-To: (message from Stefan Monnier on Wed, 15 Feb 2023 13:34:02 -0500) X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.devel:303328 Archived-At: > From: Stefan Monnier > Cc: Eli Zaretskii , juri@linkov.net, casouri@gmail.com, > larsi@gnus.org, theo@thornhill.no, jostein@secure.kjonigsen.net, > emacs-devel@gnu.org > Date: Wed, 15 Feb 2023 13:34:02 -0500 > > > out again is unreasonably difficult. Even restarting Emacs (which to me > > is a drastic operation) won't opt out if there are still buffers in > > c-ts-mode in the desktop. > > Sounds like a bug, indeed. > The `add-to-list` should not happen just because `c-ts-mode` is loaded. > I think it should only happen if `c-ts-mode` is called explicitly > (i.e. interactively). > > Maybe something like the patch below. Sorry, no. The fact that add-to-list happens also when loading c-ts-mode non-interactively is deliberate, so that users could 'require' or 'load' them in their init files. Less clean, maybe, but more practical and easier to use.