diff options
author | Glenn Morris <rgm@gnu.org> | 2018-11-24 07:51:04 -0800 |
---|---|---|
committer | Glenn Morris <rgm@gnu.org> | 2018-11-24 07:51:04 -0800 |
commit | 3aa22e6ec615c5dadb134f1e45ee9bb3034518b7 (patch) | |
tree | 1e853b6bf22b80cd184d7da2cb5ea470f1678b23 | |
parent | 0525b495112f7ca1c356166db65576c717e88eec (diff) | |
parent | 9877c03293241091ba4069002d4dc4d74b557414 (diff) | |
download | emacs-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.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 |