From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Wasim Abbas Newsgroups: gmane.emacs.bugs Subject: bug#47267: 28.0.50; Emacs hangs in font-lock-default-fontify-region Date: Fri, 19 Mar 2021 22:03:26 +0000 Message-ID: <4A8A4E81-9613-4391-8341-996712113934@gmail.com> References: Mime-Version: 1.0 (Mac OS X Mail 13.4 \(3608.120.23.2.4\)) Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="26286"; mail-complaints-to="usenet@ciao.gmane.io" To: 47267@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Fri Mar 19 23:04:12 2021 Return-path: Envelope-to: geb-bug-gnu-emacs@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 1lNNE3-0006gH-TG for geb-bug-gnu-emacs@m.gmane-mx.org; Fri, 19 Mar 2021 23:04:11 +0100 Original-Received: from localhost ([::1]:38918 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lNNE2-00073f-UZ for geb-bug-gnu-emacs@m.gmane-mx.org; Fri, 19 Mar 2021 18:04:10 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:38304) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lNNDu-00072f-Kw for bug-gnu-emacs@gnu.org; Fri, 19 Mar 2021 18:04:02 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:39606) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1lNNDu-000419-DF for bug-gnu-emacs@gnu.org; Fri, 19 Mar 2021 18:04:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1lNNDu-0002Ym-91 for bug-gnu-emacs@gnu.org; Fri, 19 Mar 2021 18:04:02 -0400 X-Loop: help-debbugs@gnu.org In-Reply-To: Resent-From: Wasim Abbas Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 19 Mar 2021 22:04:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 47267 X-GNU-PR-Package: emacs Original-Received: via spool by 47267-submit@debbugs.gnu.org id=B47267.16161914209808 (code B ref 47267); Fri, 19 Mar 2021 22:04:02 +0000 Original-Received: (at 47267) by debbugs.gnu.org; 19 Mar 2021 22:03:40 +0000 Original-Received: from localhost ([127.0.0.1]:51152 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lNNDY-0002Y8-Ha for submit@debbugs.gnu.org; Fri, 19 Mar 2021 18:03:40 -0400 Original-Received: from mail-ed1-f46.google.com ([209.85.208.46]:45882) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lNNDU-0002Xs-E0 for 47267@debbugs.gnu.org; Fri, 19 Mar 2021 18:03:39 -0400 Original-Received: by mail-ed1-f46.google.com with SMTP id bx7so12456313edb.12 for <47267@debbugs.gnu.org>; Fri, 19 Mar 2021 15:03:36 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:content-transfer-encoding:mime-version:subject:message-id:date :to; bh=biFZ89wojF/SQ8mGFYQVM720oxALaKa0z1Qaskh6T1w=; b=UCKu4hNzN5UYh+Ss5QxRG9uOARdFoPiNRQSVHTTc0Vez7h4OuhVUxy/MiBJo19mhk5 dAQnhLjMdWvVJ3F/pCLNgn7Vn5t2Cd8gPMll26dgBe4r9P5wEx3e++8YjiyGJjkRM9XE rpef17o+Crr7/CmsCrarKUdCs+5zwKkGLIc05BfniatZpSlhp09UAx2uEokJ2cCw5PtW me5QG2QggPwZYhVcRBWawTB2GT8MbTs38yqpnmEHbIc/T4EZSbLMvWzBUsdUY0LOpohU DZOnG7+AemmElWnNELLXMM6GxL+89+3oNKBv8A2vKNfhIeWFoOlodDSwdHCrPEcm+879 5xUg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:content-transfer-encoding:mime-version :subject:message-id:date:to; bh=biFZ89wojF/SQ8mGFYQVM720oxALaKa0z1Qaskh6T1w=; b=kM+MHCrQ1vmQzfTBP9zlrgZLWnIZTj9IXc7cbc8QzgmoOgm9p1Ja9fjsxEGlOJDrej rIlV2Gk2Jd6mnyY2JMMgVxnoqKeH7xZ1B+WiYhnkmbxAnxl8GRnBC59tu9WER+G69B/N ipV7r9fGY3NMOfS8vqUyZsIyxFTHaHpc3xArvMQXw0X55eVLO3aJ1y3KhF3OXFajhGQS wmSN98JuTpLriOX8Pa8/Imf9N8w8iThqJ9zqQHmNz3n4Q3UiULj9vqKVnQa2Lft6liHN H+FeSBdlKEFYqj9xehYB8YTVzypI7A4uiyLbcvRDardUxQmOqSW3+JZGxtDkwYrb2V6Z hohA== X-Gm-Message-State: AOAM530MIzieaDtuID/drwi/OzAKQ1l6P3sjvgKuwTXN3DUG/70ugwYg fI77CsMi/rPJpGLaSi4jV7gRtIwoPUzBPQ== X-Google-Smtp-Source: ABdhPJyhq5xlLa9M/hPH6d+PnnkJFZNylcERpAj/t8PFZWfwFgLVpkACQLCQz12BoxAA9PJx3euQsg== X-Received: by 2002:a05:6402:12cf:: with SMTP id k15mr11852772edx.192.1616191408576; Fri, 19 Mar 2021 15:03:28 -0700 (PDT) Original-Received: from [192.168.0.8] (cpc92724-cmbg20-2-0-cust48.5-4.cable.virginm.net. [82.25.5.49]) by smtp.gmail.com with ESMTPSA id be27sm4939113edb.47.2021.03.19.15.03.27 for <47267@debbugs.gnu.org> (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Fri, 19 Mar 2021 15:03:27 -0700 (PDT) X-Mailer: Apple Mail (2.3608.120.23.2.4) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.io gmane.emacs.bugs:202714 Archived-At: Forgot to mention to reproduce it, you need to scroll up and down for = this to kick in. I have seen this happening with shortcuts too but = usually scrolling up and down quickly with mouse will trigger it. Also did some more digging and git bisect found the first bad commit: 92c56300c317c9e5573dca787a2cf20f777b3179 is the first bad commit commit 92c56300c317c9e5573dca787a2cf20f777b3179 Author: Alan Mackenzie Date: Tue Dec 15 12:09:47 2020 +0000 CC Mode: Optimize for scrolling large buffers containing few braces This fixes bug #25706. It particularly pertains to .h files which = contain only macro definitions. Many of these files are to be found, for = example, in the driver sections of the Linux kernel. * lisp/progmodes/cc-engine.el (c-beginning-of-statement-1, = c-on-identifier) (c-syntactic-skip-backward, c-find-decl-prefix-search, = c-find-decl-spots) (c-forward-name, c-back-over-list-of-member-inits) (c-back-over-member-initializers, c-looking-at-inexpr-block) (c-guess-basic-syntax): Give search limits to, or amend existing = ones to c-backward-syntactic-ws, c-forward-syntactic-ws, c-backward-token-2, c-beginning-of-statement-1. (c-determine-limit-no-macro): New function. (c-determine-limit-get-base): Remove unlimted invocation of c-backward-syntactic-ws. (c-determine-limit): Exclude movement between two different macros. = Use new function c-determine-limit-no-macro. (c-back-over-list-of-member-inits): New parameter `limit'. * lisp/progmodes/cc-fonts.el (c-font-lock-complex-decl-prepare) (c-font-lock-declarations, c-font-lock-c++-using): Give search = limits to, or amend existing ones to c-backward-syntactic-ws, = c-beginning-of-decl-1. * lisp/progmodes/cc-mode.el (c-unfind-coalesced-tokens, = c-before-changer) (c-fl-decl-end): Give search limits to, or amend existing ones to c-backward-syntactic-ws, c-forward-syntactic-ws, = skip-chars-backward, skip-chars-forward. lisp/progmodes/cc-engine.el | 282 = ++++++++++++++++++++++++++++---------------- lisp/progmodes/cc-fonts.el | 16 ++- lisp/progmodes/cc-mode.el | 33 ++++-- 3 files changed, 212 insertions(+), 119 deletions(-)=