]> git.eshelyaron.com Git - emacs.git/commit
Optimise c-parse-state for large buffers with few (if any) braces.
authorAlan Mackenzie <acm@muc.de>
Mon, 14 Dec 2020 19:38:52 +0000 (19:38 +0000)
committerAlan Mackenzie <acm@muc.de>
Mon, 14 Dec 2020 19:38:52 +0000 (19:38 +0000)
commit9022df70270243f211c54ccd66800320148b8434
tree096767d7a6f6c5776d2da9fe7ca1c4e62af16f0d
parentcd81739af17406cad0eb121cd979350e45cd1b92
Optimise c-parse-state for large buffers with few (if any) braces.

* lisp/progmodes/cc-engine (c-get-fallback-scan-pos): Search a maximum of
50,000 characters back for the two BODs.  Return nil if we dont' find them.
(c-parse-state-get-strategy): For strategy `forward', always use the position
`good-pos' for `start-point', even when there's a change of current macro.
Deal with a possible return value of nil from c-get-fallback-scan-pos (as
above).
(c-invalidate-state-cache-1): For `c-state-cache-good-pos', instead of
sometimes using the minimum scan pos (leading to extensive scanning of the
entire buffer) use a point close to `here'.
lisp/progmodes/cc-engine.el