Fontify a CPP construct correctly when a comment follows without spaces
commit88ddf53ef086ee2f2e0ea729bc4afbf34d88d82b
authorAlan Mackenzie <acm@muc.de>
Thu, 21 Dec 2017 17:49:14 +0000 (21 17:49 +0000)
committerAlan Mackenzie <acm@muc.de>
Thu, 21 Dec 2017 17:55:59 +0000 (21 17:55 +0000)
tree540cb7c167a90597cbeb7b6c88dbd9498d89e1e8
parentde7de9cc0cfcef1c7651887fd36fc2a346dadd6c
Fontify a CPP construct correctly when a comment follows without spaces

Do this by removing a broken optimization in the state cache which put
category text properties on a character between the end of the CPP construct
and the beginning of the comment.  This can't work when there's no such
character.

* lisp/progmodes/cc-defs.el (c-cpp-delimiter, c-set-cpp-delimiters)
(c-clear-cpp-delimiters, c-comment-out-cpps, c-with-cpps-commented-out)
(c-with-all-but-one-cpps-commented-out): Remove.

* lisp/progmodes/cc-engine.el (c-no-comment-end-of-macro): Return the comment
start position rather than one character before it.
(c-invalidate-state-cache, c-parse-state): Remove the invocations of
c-with-all-but-one-cpps-commented-out and c-with-cpps-commented-out.

* lisp/progmodes/cc-mode.el (c-neutralize-syntax-in-and-mark-CPP): Rename to
c-neutralize-syntax-in-CPP and remove the bits which applied category
properties.

* lisp/progmodes/cc-langs.el (c-before-font-lock-functions): Incorporate the
new name of the function c-neutralize-syntax-in-CPP.
lisp/progmodes/cc-defs.el
lisp/progmodes/cc-engine.el
lisp/progmodes/cc-langs.el
lisp/progmodes/cc-mode.el