Commit 2c9c1954 authored by Martin Stjernholm's avatar Martin Stjernholm
Browse files

(c-just-after-func-arglist-p): Safeguard against unbalanced sexps.

parent 0b966e89
...@@ -4272,14 +4272,16 @@ brace." ...@@ -4272,14 +4272,16 @@ brace."
;; otherwise, we could be looking at a hanging member init ;; otherwise, we could be looking at a hanging member init
;; colon ;; colon
(goto-char checkpoint) (goto-char checkpoint)
(while (eq (char-before) ?,) (while (and
;; this will catch member inits with multiple (eq (char-before) ?,)
;; line arglists ;; this will catch member inits with multiple
(forward-char -1) ;; line arglists
(c-backward-syntactic-ws (c-point 'bol)) (progn
(if (eq (char-before) ?\)) (forward-char -1)
(c-backward-sexp 2) (c-backward-syntactic-ws (c-point 'bol))
(c-backward-sexp 1)) (c-safe (c-backward-sexp 1) t))
(or (not (looking-at "\\s\("))
(c-safe (c-backward-sexp 1) t)))
(c-backward-syntactic-ws lim)) (c-backward-syntactic-ws lim))
(if (and (eq (char-before) ?:) (if (and (eq (char-before) ?:)
(progn (progn
......
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