Fix a loop in C Mode caused by inadequate analysis of comments.
commit230e25fd67fd654f04b8c744db0e170353a7f3b3
authorAlan Mackenzie <acm@muc.de>
Mon, 10 Apr 2017 21:01:38 +0000 (10 21:01 +0000)
committerAlan Mackenzie <acm@muc.de>
Mon, 10 Apr 2017 21:01:38 +0000 (10 21:01 +0000)
treeca4c9def3c497739dd48e5d8c708b5addf51f4de
parent3ccd0ff1064a2836c379b13c2d5f4b11c5da1f88
Fix a loop in C Mode caused by inadequate analysis of comments.

After M-;, and the insertion of the opening "/*", the CC Mode after-change
function got confused, since the new comment opener matched the end of a
subsequent comment, but moving back over that comment did not come back to the
starting point.  Fix this.

* lisp/progmodes/cc-engine.el (c-end-of-macro): Add a limit parameter, wherer
point is left if no end-of-macro is found before it.
(c-forward-sws): Change the `safe-start' mechanism.  Now `safe-start' is
non-nil except where we have an unclosed block comment at the end of a macro.
This enables us to populate the cache more fully, at the cost of some run
time.
lisp/progmodes/cc-engine.el