diff options
-rw-r--r-- | lisp/progmodes/cc-mode.el | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/lisp/progmodes/cc-mode.el b/lisp/progmodes/cc-mode.el index cc1991a5643..4dd8f51a070 100644 --- a/lisp/progmodes/cc-mode.el +++ b/lisp/progmodes/cc-mode.el @@ -1804,7 +1804,10 @@ Note that this is a strict tail, so won't match, e.g. \"0x....\".") (c-syntactic-skip-backward "^;{}" bod-lim t) (> (point) bod-lim) (progn (c-forward-syntactic-ws) - (setq bo-decl (point)) + ;; Have we got stuck in a comment at EOB? + (not (and (eobp) + (c-literal-start)))) + (progn (setq bo-decl (point)) (or (not (looking-at c-protection-key)) (c-forward-keyword-clause 1))) (progn |