From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Gregory Heytings Newsgroups: gmane.emacs.devel Subject: Re: New optimisations for long raw strings in C++ Mode. Date: Tue, 09 Aug 2022 20:39:51 +0000 Message-ID: <703c2351d96919276449@heytings.org> References: <87r11s2p7f.fsf@gnus.org> <87fsi818ju.fsf@gnus.org> <87wnbkyuhe.fsf@gnus.org> <83sfm8vxht.fsf@gnu.org> <87k07hxwe9.fsf@gnus.org> <87fsi5xw9l.fsf@gnus.org> <83wnbhtlzb.fsf@gnu.org> Mime-Version: 1.0 Content-Type: text/plain; format=flowed; charset=us-ascii Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="20187"; mail-complaints-to="usenet@ciao.gmane.io" Cc: Alan Mackenzie , larsi@gnus.org, emacs-devel@gnu.org To: Eli Zaretskii Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Tue Aug 09 22:43:16 2022 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 1oLW4J-0004xp-Ig for ged-emacs-devel@m.gmane-mx.org; Tue, 09 Aug 2022 22:43:15 +0200 Original-Received: from localhost ([::1]:51778 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oLW4H-000302-1N for ged-emacs-devel@m.gmane-mx.org; Tue, 09 Aug 2022 16:43:13 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:59234) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oLW16-0001TZ-3c for emacs-devel@gnu.org; Tue, 09 Aug 2022 16:39:56 -0400 Original-Received: from heytings.org ([95.142.160.155]:44466) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oLW14-0001xg-8v; Tue, 09 Aug 2022 16:39:55 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=heytings.org; s=20220101; t=1660077591; bh=Xw7Q9B4fhhW7FfzU8j9S9GeZF25gb4rxwqFSeP1QYw0=; h=Date:From:To:cc:Subject:In-Reply-To:Message-ID:References:From; b=0CyeOhdBU7DfnfuMuhtAbaechO6p21fOUttYR5EL9h3KQaSGzg1EKtw5iypOJrlay dDoJBWCOcwZTXK5JBxiHE1Y2qm0OEGagM2yg75AKPp6ZBZ93Cw087KMPWsxQjFtmMB hAGPIyWugfJVhktfQY4XfQxEe0odC2xcYWbYM98duCYeEOKewNEz+q5KT5paZusqrV YR+VZ0RfguKSb3mmLtrMfbG7tTXiWKD4pPRIc+0wxpSkK59UrixsQwsqwBBCHmgD15 FFyaP11ZRDM0arjK+Kn6MvUunmZrS/bpRTbyNCzO6r+d1yACdyLSqj5IIDuZZjFDcB GcKG23bH+11Hw== In-Reply-To: <83wnbhtlzb.fsf@gnu.org> Received-SPF: pass client-ip=95.142.160.155; envelope-from=gregory@heytings.org; helo=heytings.org X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action 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" Xref: news.gmane.io gmane.emacs.devel:293332 Archived-At: >>> But opening the resulting file with "emacs -Q" and then doing a `M->' >>> now hangs Emacs, which it didn't use to do, I think? >> >> If you do (setq long-line-threshold nil), M-> is fast. Only when you >> omit it does Emacs hang. Hmm. It's meant to be the other way around, >> isn't it? ;-) > > Yes. I'm guessing there's some additional bug there. > As has been discussed, CC Mode is, sadly, by design, incompatible with the new feature (and I wonder what the ";-)" above is supposed to convey). It insists on accessing the whole buffer, and doesn't downgrade gracefully when it can't. In this case, with emacs -Q, after M->, (jit-lock-fontify-now 999600 1001100) is called, which calls (c-font-lock-fontify-region 999600 1000034), which does (widen), and calls (font-lock-default-fontify-region 991200 1000034) because these (991200 and 1000034) are the bounds of the locked narrowing. For some reason (which I don't have the patience to track down), because that (widen), which shouldn't be there in the first place, doesn't do what the function expects it to do, font-lock-default-fontify-region never ends.