From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: martin rudalics Newsgroups: gmane.emacs.devel Subject: Re: cc-mode fontification feels random Date: Sun, 13 Jun 2021 11:39:55 +0200 Message-ID: References: <86a85d26-75c0-e4a3-e8d3-244c5346dd3a@dancol.org> <83r1hehnz9.fsf@gnu.org> <83lf7mhl3n.fsf@gnu.org> <73ff18bf-66dc-7d7a-a0db-8edc2cdceba8@gmx.at> <4140fcf4-3119-3f3f-4ac4-24d497774754@gmx.at> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="7698"; mail-complaints-to="usenet@ciao.gmane.io" Cc: Richard Stallman , emacs-devel , Stefan Monnier , Alan Mackenzie , Eli Zaretskii , Daniel Colascione To: =?UTF-8?B?Sm/Do28gVMOhdm9yYQ==?= Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Sun Jun 13 11:41:55 2021 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 1lsMct-0001rg-Bu for ged-emacs-devel@m.gmane-mx.org; Sun, 13 Jun 2021 11:41:55 +0200 Original-Received: from localhost ([::1]:36664 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lsMcs-00078l-Da for ged-emacs-devel@m.gmane-mx.org; Sun, 13 Jun 2021 05:41:54 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:60974) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lsMbH-0005lQ-RS for emacs-devel@gnu.org; Sun, 13 Jun 2021 05:40:15 -0400 Original-Received: from mout.gmx.net ([212.227.17.20]:44897) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lsMbE-0004NB-Id; Sun, 13 Jun 2021 05:40:15 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gmx.net; s=badeba3b8450; t=1623577197; bh=8IrBcurkJc0l3Grfyg/X1U7vzzGHOwiaosCBqI0HgJQ=; h=X-UI-Sender-Class:Subject:To:Cc:References:From:Date:In-Reply-To; b=W6Ae7WQq6gd/U9xIc9wZ7R3EfwvBdNbG/c48phRHg/EHZYyyVUjnf0c4lTIxIC+n6 yjhPebA0+3jIR7X+i0wxLVO7uRdns3pbcQqs0slzqPhNP+IhL6qMqIOcGdHeQF2te7 nCFu2fw9mpr4vJK2UAXFrQEFUpUT1Kqj/XBGQnW4= X-UI-Sender-Class: 01bb95c1-4bf8-414a-932a-4f6e2808ef9c Original-Received: from [192.168.1.100] ([212.95.5.96]) by mail.gmx.net (mrgmx104 [212.227.17.168]) with ESMTPSA (Nemesis) id 1N5GE1-1l8pD61CeD-01175r; Sun, 13 Jun 2021 11:39:57 +0200 In-Reply-To: Content-Language: en-US X-Provags-ID: V03:K1:At9g1Ek42puG5M7S5zwiptqVcsuUOJ2iRbwYjTtNYFM6R0X6SFf aeEbf1UkoJcugavKTxiYDuWY098C5Bw4Pt7XizB8+63I+vjkpmEHMgJ/I29yuX8PLqiJWp2 URN+ms16BFIk0v3veUvwBpd7W9JYswSaaGvOhww+DpWJ3ZaSY96NMN7zfF3/ZmhSBXj5/mF FoZV2SAcjh3hRRwRDF/yg== X-UI-Out-Filterresults: notjunk:1;V03:K0:qUa5+9eVU3c=:bz7P0AliAOGoBjqloXL5D9 iIjyGwZ362WfkgwZCFYvs4tlgnqZs8LHqGp/ktbovB9siBH7wdasyXUTWq9jk5GasuozmGX0O TllYQe8ke8JEgtT70SU7gcc5ED0dP2FJaFISkgBkv0K4hEoBxwS2SisejSG+u0Vyy2X/NE56z agmBPhWfO+88FFvMen9BFqzKPzmM3ybgU11HUKjSVqrbhWLCElyZlIFDbCZX4/BrWMw+/RvoP 7Q9hTmBmvPfZ/Sbovn7bHJRiwYtOc5Th7HB2rdhaQ3EDX/gNljfPehMLxMMYz5mwqjsRZw1H/ 6utQlqvXlz5EtcVcr1D5dzNJN3v6TT0+NNaXQgq78RNIgOJgxMc6XKUpRW0UZ5VbIN9+u8NAA /mnSklkXSVv6fGo0uJfLR2ppEPEhb2GDdVyE6NlzlWXWrYcjaBY0gSIOsFKNFfmmRw8JfjM39 j0rHeTK1IYpTzQPNOnmDsiwo92lsO719RDdR/M6D5nh6fwUbCaWJiptbm0RIln0N7IYkLhXNK UfhSIl31vox0CENtgfI799hWpblmwLyyBqi4Ze8dwlvpSVqMbdSXKa5kFdaEQcqdie+GrX3IF NsROUaRyL29gGgN3VBe1cphpPD0e7guqJ3uhFc2r1jVAt56lL1POwRg4jYln+DlbKRhIB1bfX mNjui9WHSsK0D7il820m6FU2h7H1IBi/4pE2RgUyhBwSwyAKOOyZPOhyx13kc1l/2ROaIbWsc kHlQ3H2DAPX9V6tctjqCcXFY2b0olks07Uxjp50ooshMqB6zfFCWTAVpVbTZfxRMK+eM6in5 Received-SPF: pass client-ip=212.227.17.20; envelope-from=rudalics@gmx.at; helo=mout.gmx.net X-Spam_score_int: -18 X-Spam_score: -1.9 X-Spam_bar: - X-Spam_report: (-1.9 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_MSPIKE_H3=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.23 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" Xref: news.gmane.io gmane.emacs.devel:270788 Archived-At: >> The idea is good but still not what I want. I don't want the entire >> rest of my buffer get refontified even when I do not stay on the same >> line. > > Right. I was strictly addressing your description of adding a single > quote and then watching the whole buffer repaint itself. If one does other > editing or movement actions after that, then antiblink throws in the towels > and says "all bets are off, better not assume more things about the user's > fontification intentions". > > That's because maybe you _do_ want the whole buffer to be refontified > and are intending to go to some point up to EOB to put the closing quote. I admit that this probably meets most users' intentions. What I do not understand about its implementation is that if `jit-lock-contextually' is t (as it is usually set by `jit-lock-register'), you unconditionally add the antiblink mechanism to `post-command-hook' which IIUC causes a `syntax-ppss' call unconditionally getting run for each command even when `jit-lock-antiblink-grace' is nil. Is that perception correct? If so, I think that you should not do that. > Regardless, I would file a bug if I saw that behaviour :-) , ... even with `open-paren-in-column-0-is-defun-start' non-nil? > because it might > be my sincere intention to have the buffer be repainted. I could be composing > a docstring or an example where an opening parenthesis happens to > have fallen on the first column of a line. > > In fact I seem to remember that in SLIME or SLY that is already problematic > when evaluating a chunk of code where a docstring happens to have that > quirk. And that it is because of open-paren-at-column-0-is-defun-start. But `open-paren-in-column-0-is-defun-start' is a customizable variable. Which means that a user should be able to use it to control the behavior of Emacs in this regard. And it is t by default for no obvious reason. > In another ISTR moment, ISTR that other editors do the same as Emacs > does here , i.e. repaint. I haven't seen an equivalent to antiblink. martin