[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#47267: 28.0.50; Emacs hangs in font-lock-default-fontify-region
From: |
Wasim Abbas |
Subject: |
bug#47267: 28.0.50; Emacs hangs in font-lock-default-fontify-region |
Date: |
Fri, 19 Mar 2021 22:03:26 +0000 |
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 <acm@muc.de>
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(-)