]> git.eshelyaron.com Git - emacs.git/commit
CC Mode: Fix bug #40052, where a very large macro was too slow in scrolling
authorAlan Mackenzie <acm@muc.de>
Fri, 15 May 2020 19:24:29 +0000 (19:24 +0000)
committerAlan Mackenzie <acm@muc.de>
Fri, 15 May 2020 19:24:29 +0000 (19:24 +0000)
commit66cbe8b946bf83ab19c0d9a7b9fc03e951ffd5b6
treec829c22997d507dec9142eadad25967a8362db3f
parentafca37343d0637386e4dfc4fb04d8700f3c6bf0d
CC Mode: Fix bug #40052, where a very large macro was too slow in scrolling

* lisp/progmodes/cc-engine.el (c-end-of-macro): Fix faulty cache handling,
where the upper bound of c-macro-cache was never being set.
(c-forward-comment-minus-1): New macro which terminates unwanted indefinite
backward searching with lots of escaped newlines in c-backward-single-comment.
(c-backward-single-comment, c-backward-comments): Use the new macro above.

* lisp/progmodes/cc-mode.el (c-before-change-check-unbalanced-strings)
(c-after-change-mark-abnormal-strings, c-after-change-escape-NL-in-string):
Optimize three regexps by using shy groups, thus preventing regexp stack
overflow while handling the large C Macro.
lisp/progmodes/cc-engine.el
lisp/progmodes/cc-mode.el