Fix bug in the state cache mechanism. Remove 'BOD "strategy". Refactor.
commitd23b0804fb3601e87762a1f2ea628949bb05f929
authorAlan Mackenzie <acm@muc.de>
Sat, 2 Feb 2013 18:24:10 +0000 (2 18:24 +0000)
committerAlan Mackenzie <acm@muc.de>
Sat, 2 Feb 2013 18:24:10 +0000 (2 18:24 +0000)
tree56d35c6d5569c9b37fa39989a28b9a38fbdc2163
parent970b321fd0033d883243a1240494ff9471435a34
Fix bug in the state cache mechanism.  Remove 'BOD "strategy".  Refactor.
cc-engine.el (c-get-fallback-scan-pos): Remove.
(c-parse-state-get-strategy): Don't return 'BOD any more.
(c-append-lower-brace-pair-to-state-cache): Extra parameter HERE instead
of narrowing.  Widen to top of buffer before searching backwards for a
brace pair.
(c-state-push-any-brace-pair): Add HERE parameter to function call.
(c-append-to-state-cache): Extra parameter HERE in place of narrowing.
Narrow to parameter HERE, in place of being called narrowed.
(c-remove-stale-state-cache): Extra parameter HERE in place of narrowing.
Check there's an open brace in the cache before searching for its match.
(c-invalidate-state-cache-1): Add HERE parameter to function call.
(c-parse-state-1): Don't narrow here for 'forward strategy, instead
passing extra parameter HERE to several functions.  Remove 'BOD strategy.
lisp/ChangeLog
lisp/progmodes/cc-engine.el