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: treesit indentation "blinking" Date: Sat, 25 Mar 2023 17:42:41 +0300 Message-ID: <83v8ioc2ou.fsf@gnu.org> References: <87h6ucik61.fsf@dancol.org> <0F406D08-56D4-4B21-B94D-A47681606911@gmail.com> <1870bcadd28.2829.cc5b3318d7e9908e2c46732289705cb0@dancol.org> <1870cce6690.2829.cc5b3318d7e9908e2c46732289705cb0@dancol.org> <35A837A9-59B4-4F1F-A5FA-8483C8024D76@gmail.com> <187104f6b48.2829.cc5b3318d7e9908e2c46732289705cb0@dancol.org> <21d018e5-a730-12e3-f97c-fffa4f646ccf@yandex.ru> Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="22241"; mail-complaints-to="usenet@ciao.gmane.io" Cc: joaotavora@gmail.com, dancol@dancol.org, casouri@gmail.com, emacs-devel@gnu.org To: Dmitry Gutov Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Sat Mar 25 15:44:00 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 1pg57g-0005UE-9V for ged-emacs-devel@m.gmane-mx.org; Sat, 25 Mar 2023 15:44:00 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pg56b-0000tK-K7; Sat, 25 Mar 2023 10:42:54 -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 1pg56Y-0000sq-Ca for emacs-devel@gnu.org; Sat, 25 Mar 2023 10:42:51 -0400 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 1pg56W-0008Eb-Kg; Sat, 25 Mar 2023 10:42:48 -0400 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=yrUqIZfzmpRGHjXzjWT7hAvTM7l9jEBePPHHbnfvC1s=; b=j0JBJU/wb3V5 l0cSPLVoaviYAsid0x2o+eAZEcqR3usUOn92trQf60Tb1w0oh0wzBMVFuYSKfjut3Uc/4dvLupDuF Pc4NvuBT1faCFDNFAu6LvdNCPvGFQ2K7k7j6+wJ5VcZRA/WygTGzBC3SE819xPmWlvcBcse9zFc8m 9OkrhthYzCUx2qIf1twJRZtEmLZk0jwq8b5EnoHI9MuwgXhuEtHMUYeEU8EoCMEzCeHaWpjeRGdQZ Qzgkcbcjhw3B32J8RGgbNZ3Yy9f6fxQGDj9OobGc6sTNxH0ovhjdKYEh94DaRh8iTNPZCUmv/GMz6 dgXD7iSVhlu9N9Nm0iUBJw==; 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 1pg56R-0000nM-3o; Sat, 25 Mar 2023 10:42:43 -0400 In-Reply-To: <21d018e5-a730-12e3-f97c-fffa4f646ccf@yandex.ru> (message from Dmitry Gutov on Sat, 25 Mar 2023 14:42:50 +0200) 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:304763 Archived-At: > Date: Sat, 25 Mar 2023 14:42:50 +0200 > Cc: Daniel Colascione , Yuan Fu , > emacs-devel@gnu.org > From: Dmitry Gutov > > > I don't think this problem has anything to do with tree-sitter. It > > would happen just as well in regular c++-mode if electric-indent-mode > > were on by default there (but it isn't). > > The mode is globally on by default, but indeed the contents of > electric-indent-chars are much shorter there. > > > So it's just the fact that electric-indent-mode is on by default > > _and_ c-ts-mode.el does this: > > > > (setq-local electric-indent-chars (append "{}():;,#" electric-indent-chars)) > > > > so people are getting what the mode author (and Emacs defaults) ask for: > > electric indentation doing its thing. > > Good point: perhaps either this list should be revisited, or predicated > (at runtime) somehow on electric-pair-mode being enabled. Maybe the list of electric characters should be a defcustom?