mirror of
git://git.sv.gnu.org/emacs.git
synced 2025-12-14 10:00:25 -08:00
Fix bug #33416, where typing a ) in a comment at EOB caused a loop (CC Mode).
* lisp/progmodes/cc-mode.el (c-fl-decl-start): A c-forward-syntactic-ws leaves point inside whitespace when moving over a comment at EOB which has no terminating LF. Check this possibility and correct for it.
This commit is contained in:
parent
25a4205271
commit
9877c03293
1 changed files with 4 additions and 1 deletions
|
|
@ -1512,7 +1512,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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue