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: bug-reference-prog-mode slows down CC Mode's scrolling by ~7% Date: Wed, 01 Sep 2021 21:01:55 +0300 Message-ID: <83mtowp430.fsf@gnu.org> References: <83r1e8p4w8.fsf@gnu.org> Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="14846"; mail-complaints-to="usenet@ciao.gmane.io" Cc: emacs-devel@gnu.org To: Alan Mackenzie Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Wed Sep 01 20:03:31 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 1mLUaA-0003cq-CE for ged-emacs-devel@m.gmane-mx.org; Wed, 01 Sep 2021 20:03:30 +0200 Original-Received: from localhost ([::1]:42704 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mLUa9-000828-3w for ged-emacs-devel@m.gmane-mx.org; Wed, 01 Sep 2021 14:03:29 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:58212) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mLUYi-0007IY-Ar for emacs-devel@gnu.org; Wed, 01 Sep 2021 14:02:00 -0400 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]:60096) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mLUYh-00053k-Tf; Wed, 01 Sep 2021 14:01:59 -0400 Original-Received: from 84.94.185.95.cable.012.net.il ([84.94.185.95]:3210 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 1mLUYh-0004XK-FK; Wed, 01 Sep 2021 14:01:59 -0400 In-Reply-To: (message from Alan Mackenzie on Wed, 1 Sep 2021 17:55:46 +0000) 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:273679 Archived-At: > Date: Wed, 1 Sep 2021 17:55:46 +0000 > Cc: emacs-devel@gnu.org > From: Alan Mackenzie > > > (I thought that the code in jit-lock.el already handled this case by > > computing a kind-of "maximum" out of all the return values of > > jit-lock-functions, and treating a nil return value as expected, but > > maybe my reading of the code was incorrect?) > > I think it rather uses the "minimum", i.e. the region common to all the > return values from the jit-lock-functions. If one of these values is nil > (as is the case here), that boils down to exactly the 500-byte chunk. Then I think the easiest fix is to get bug-reference-prog-mode return a suitable value, or wrap it in a function that would. Every function that puts itself on jit-lock-functions without actually fontifying anything should return BOB..EOB as the region it fontified, right?