GNU bug report logs - #52298
29.0.50; Frequent redisplay cycles induced by c-type-finder-timer-func timer in CC Mode

Previous Next

Package: emacs;

Reported by: Eli Zaretskii <eliz <at> gnu.org>

Date: Sun, 5 Dec 2021 07:47:02 UTC

Severity: normal

Found in version 29.0.50

Done: Alan Mackenzie <acm <at> muc.de>

Bug is archived. No further changes may be made.

Full log


Message #56 received at 52298 <at> debbugs.gnu.org (full text, mbox):

From: Alan Mackenzie <acm <at> muc.de>
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: acm <at> muc.de, 52298 <at> debbugs.gnu.org
Subject: Re: bug#52298: 29.0.50; Frequent redisplay cycles induced by
 c-type-finder-timer-func timer in CC Mode
Date: Sun, 12 Dec 2021 08:58:08 +0000
Hello, Eli.

On Sat, Dec 11, 2021 at 20:21:51 +0200, Eli Zaretskii wrote:
> > Date: Sat, 11 Dec 2021 17:04:28 +0000
> > Cc: 52298 <at> debbugs.gnu.org
> > From: Alan Mackenzie <acm <at> muc.de>

> > So, I suggest I write a commit message and commit that patch.

> Which patch?  I'm afraid I'm missing something here.

This one, the one that should prevent excessive incursions into the
redisplay engine when a text property gets set whilst
inhibit-modification-hooks is set:

diff --git a/src/textprop.c b/src/textprop.c
index d7d6a66923..d91b8624ef 100644
--- a/src/textprop.c
+++ b/src/textprop.c
@@ -85,10 +85,13 @@ modify_text_properties (Lisp_Object buffer,
Lisp_Object start, Lisp_Object end)
 
   prepare_to_modify_buffer_1 (b, e, NULL);
 
-  BUF_COMPUTE_UNCHANGED (buf, b - 1, e);
-  if (MODIFF <= SAVE_MODIFF)
-    record_first_change ();
-  modiff_incr (&MODIFF);
+  if (!inhibit_modification_hooks)
+    {
+      BUF_COMPUTE_UNCHANGED (buf, b - 1, e);
+      if (MODIFF <= SAVE_MODIFF)
+       record_first_change ();
+      modiff_incr (&MODIFF);
+    }
 
   bset_point_before_scroll (current_buffer, Qnil);
 
-- 
Alan Mackenzie (Nuremberg, Germany).




This bug report was last modified 3 years and 156 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.