]> code.delx.au - gnu-emacs/commit
Amend a cache so that typing into C++ raw strings has no undue delay.
authorAlan Mackenzie <acm@muc.de>
Mon, 27 Jun 2016 11:34:02 +0000 (11:34 +0000)
committerAlan Mackenzie <acm@muc.de>
Mon, 27 Jun 2016 11:34:02 +0000 (11:34 +0000)
commit8040d99b6294ad798d4ab677ba20082b45fd2e7d
tree9c53c471d718eb1a2028168705324ffa9501cac4
parent15c307417f7bc13b27f06994dd931cb04873a26f
Amend a cache so that typing into C++ raw strings has no undue delay.

Also amend the code so that low-level searches to the end of literals are done
only when these positions get used.

* lisp/progmodes/cc-engine.el (c-crosses-statement-barrier-p): Use the new
c-literal-start instead of c-literal-limit.
(c-state-semi-nonlit-pos-cache): Change the structure of this cache, such that
it stores details of the literal at a point, rather than merely points outside
of literals.
(c-state-semi-pp-to-literal, c-state-full-pp-to-literal)
(c-cache-to-parse-ps-state, c-parse-ps-state-to-cache, c-ps-state-cache-pos)
(c-parse-ps-state-below, c-literal-start): New functions.
(c-state-semi-safe-place): Removed.
(c-in-literal): Use c-state-semi-pp-to-literal, so as not to scan to its end.
(c-literal-limits, c-determine-limit-get-base): consequential amendments.
(c-find-decl-spots, c-before-change-check-<>-operators, c-raw-string-pos)
(c-guess-basic-syntax (CASE 2)): Avoid needless scans to end of literals.

* lisp/progmodes/cc-fonts.el (c-font-lock-doc-comments): Avoid needless scans
to end of literals.

* lisp/progmodes/cc-mode.el (c-fl-decl-start): Avoid needless scans to end of
literals.

* lisp/progmodes/cc-cmds.el (c-beginning-of-defun, c-end-of-defun)
(c-defun-name, c-declaration-limits): Avoid needless scans to end of literals.
lisp/progmodes/cc-cmds.el
lisp/progmodes/cc-engine.el
lisp/progmodes/cc-fonts.el
lisp/progmodes/cc-mode.el