CC Mode internal cache: Handle a cache pos being inside a two-char construct.
commitbcbd8f7e4e929604bb3dfef9937432cb05b5f648
authorAlan Mackenzie <acm@muc.de>
Sun, 7 May 2017 09:27:00 +0000 (7 09:27 +0000)
committerAlan Mackenzie <acm@muc.de>
Sun, 7 May 2017 09:27:00 +0000 (7 09:27 +0000)
treee60abdb591038992dea3225300a00982c0d167e3
parent55b07d33796a4697b37215c18b4630eeaaa4fb76
CC Mode internal cache: Handle a cache pos being inside a two-char construct.

Cache c-state-semi-nonlit-pos-cache was failing when a cache position was,
e.g., between the two characters of an opening comment "/*", and additionally
there were an odd number of quote marks (apostrophes) in the comment.  This
happened in .../src/xdisp.c in the Emacs master branch around 2017-05-02 at
buffer position 615001.

* lisp/progmodes/cc-defs.el (c-emacs-features): Repurpose symbol
pps-extended-state to mean that there are at least 11 elements in the parser
state.

* lisp/progmodes/cc-engine.el (c-cache-to-parse-ps-state)
(c-parse-ps-state-to-cache): Rewrite these to use enhanced cache element list
types which indicate potentially being inside two-char constructs.
(c-parse-ps-state-below): Rewrite to use the new versions of the above two
functions.
lisp/progmodes/cc-defs.el
lisp/progmodes/cc-engine.el