Commit 5fe41a23 authored by Alan Mackenzie's avatar Alan Mackenzie

Fix a glitch in CC Mode's syntactic whitespace cache.

* lisp/progmodes/cc-engine.el (c-forward-sws): Deal correctly with a block
comment close at the end of a macro.
parent 201f950e
......@@ -1980,17 +1980,10 @@ comment at the start of cc-engine.el for more info."
(setq macro-end (point))
;; Check for an open block comment at the end of the macro.
(goto-char macro-start)
(let (s in-block-comment)
(setq s (parse-partial-sexp (point) macro-end
nil nil s 'syntax-table))
(< (point) macro-end))
(setq in-block-comment
(and (elt s 4) ; in a comment
(null (elt s 7))))) ; a block comment
(if in-block-comment (setq safe-start nil)))
(let ((s (parse-partial-sexp macro-start macro-end)))
(if (and (elt s 4) ; in a comment
(null (elt s 7))) ; a block comment
(setq safe-start nil)))
(forward-line 1)
;; Don't cache at eob in case the buffer is narrowed.
(not (eobp)))
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment