summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGlenn Morris <rgm@gnu.org>2018-11-24 07:51:04 -0800
committerGlenn Morris <rgm@gnu.org>2018-11-24 07:51:04 -0800
commit3aa22e6ec615c5dadb134f1e45ee9bb3034518b7 (patch)
tree1e853b6bf22b80cd184d7da2cb5ea470f1678b23
parent0525b495112f7ca1c356166db65576c717e88eec (diff)
parent9877c03293241091ba4069002d4dc4d74b557414 (diff)
downloademacs-3aa22e6ec615c5dadb134f1e45ee9bb3034518b7.tar.gz
Merge from origin/emacs-26
9877c03 (origin/emacs-26) Fix bug #33416, where typing a ) in a comme...
-rw-r--r--lisp/progmodes/cc-mode.el5
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