]> git.eshelyaron.com Git - emacs.git/commit
Fix low-level handling of (big) C macros.
authorAlan Mackenzie <acm@muc.de>
Sat, 21 Jan 2017 15:14:15 +0000 (15:14 +0000)
committerAlan Mackenzie <acm@muc.de>
Sat, 21 Jan 2017 15:16:49 +0000 (15:16 +0000)
commitde3336051ef74e0c3069374ced5b5fc7bb9fba15
tree8517f111c357081d0eee84ba92e0f9ea28565c2a
parent6a788d2fc18c23dcfc5d0352649b2f690e9cbff7
Fix low-level handling of (big) C macros.

In particular, ensure that a comment detected by its syntax is not a CPP
construct marked with generic comment delimiter syntax-table text
properties.

* lisp/progmodes/cc-engine.el (c-beginning-of-macro, c-end-of-macro): Set
c-macro-cache-syntactic to nil when the cached macro changes.
(c-syntactic-end-of-macro, c-no-comment-end-of-macro)
(c-state-semi-pp-to-literal, c-state-full-pp-to-literal)
(c-state-pp-to-literal, c-parse-ps-state-to-cache)
(c-state-cache-non-literal-place, c-literal-limits, c-literal-start)
(c-determine-limit): When checking a parse syntax for a comment, check that
we're not in a CPP construct marked by syntax-table generic comment delimiter
text property.
(c-state-pp-to-literal): Change from a defsubst to a defun.

* lisp/progmodes/cc-mode.el (c-neutralize-syntax-in-and-mark-CPP): Check a
parse syntax as described above under cc-engine.el.
lisp/progmodes/cc-engine.el
lisp/progmodes/cc-mode.el