diff options
| author | Martin Stjernholm | 2003-08-26 11:51:16 +0000 |
|---|---|---|
| committer | Martin Stjernholm | 2003-08-26 11:51:16 +0000 |
| commit | 2c9c19547f065dcfb3058a41c8ac0bc9515467bf (patch) | |
| tree | d05501db89ffcd502f72eafe283cc044ed71665d | |
| parent | 0b966e89b353095562e29a4af5dff49e70c3a822 (diff) | |
| download | emacs-2c9c19547f065dcfb3058a41c8ac0bc9515467bf.tar.gz emacs-2c9c19547f065dcfb3058a41c8ac0bc9515467bf.zip | |
(c-just-after-func-arglist-p): Safeguard against unbalanced sexps.
| -rw-r--r-- | lisp/progmodes/cc-engine.el | 18 |
1 files changed, 10 insertions, 8 deletions
diff --git a/lisp/progmodes/cc-engine.el b/lisp/progmodes/cc-engine.el index 15acecfa2a8..32cd56d0ac3 100644 --- a/lisp/progmodes/cc-engine.el +++ b/lisp/progmodes/cc-engine.el | |||
| @@ -4272,14 +4272,16 @@ brace." | |||
| 4272 | ;; otherwise, we could be looking at a hanging member init | 4272 | ;; otherwise, we could be looking at a hanging member init |
| 4273 | ;; colon | 4273 | ;; colon |
| 4274 | (goto-char checkpoint) | 4274 | (goto-char checkpoint) |
| 4275 | (while (eq (char-before) ?,) | 4275 | (while (and |
| 4276 | ;; this will catch member inits with multiple | 4276 | (eq (char-before) ?,) |
| 4277 | ;; line arglists | 4277 | ;; this will catch member inits with multiple |
| 4278 | (forward-char -1) | 4278 | ;; line arglists |
| 4279 | (c-backward-syntactic-ws (c-point 'bol)) | 4279 | (progn |
| 4280 | (if (eq (char-before) ?\)) | 4280 | (forward-char -1) |
| 4281 | (c-backward-sexp 2) | 4281 | (c-backward-syntactic-ws (c-point 'bol)) |
| 4282 | (c-backward-sexp 1)) | 4282 | (c-safe (c-backward-sexp 1) t)) |
| 4283 | (or (not (looking-at "\\s\(")) | ||
| 4284 | (c-safe (c-backward-sexp 1) t))) | ||
| 4283 | (c-backward-syntactic-ws lim)) | 4285 | (c-backward-syntactic-ws lim)) |
| 4284 | (if (and (eq (char-before) ?:) | 4286 | (if (and (eq (char-before) ?:) |
| 4285 | (progn | 4287 | (progn |