Mercurial > emacs
changeset 52339:721da86ff178
(c-just-after-func-arglist-p): Safeguard against unbalanced sexps.
author | Martin Stjernholm <mast@lysator.liu.se> |
---|---|
date | Tue, 26 Aug 2003 11:51:16 +0000 |
parents | ea32bf7cfca1 |
children | 600f01b30149 |
files | lisp/progmodes/cc-engine.el |
diffstat | 1 files changed, 10 insertions(+), 8 deletions(-) [+] |
line wrap: on
line diff
--- a/lisp/progmodes/cc-engine.el Tue Aug 26 11:50:03 2003 +0000 +++ b/lisp/progmodes/cc-engine.el Tue Aug 26 11:51:16 2003 +0000 @@ -4272,14 +4272,16 @@ ;; otherwise, we could be looking at a hanging member init ;; colon (goto-char checkpoint) - (while (eq (char-before) ?,) - ;; this will catch member inits with multiple - ;; line arglists - (forward-char -1) - (c-backward-syntactic-ws (c-point 'bol)) - (if (eq (char-before) ?\)) - (c-backward-sexp 2) - (c-backward-sexp 1)) + (while (and + (eq (char-before) ?,) + ;; this will catch member inits with multiple + ;; line arglists + (progn + (forward-char -1) + (c-backward-syntactic-ws (c-point 'bol)) + (c-safe (c-backward-sexp 1) t)) + (or (not (looking-at "\\s\(")) + (c-safe (c-backward-sexp 1) t))) (c-backward-syntactic-ws lim)) (if (and (eq (char-before) ?:) (progn