(let ((before-sws-pos (point))
;; The end position of the area to search for statement
;; barriers in this round.
- (maybe-after-boundary-pos pos))
+ (maybe-after-boundary-pos pos)
+ comma-delimited)
;; Go back over exactly one logical sexp, taking proper
;; account of macros and escaped EOLs.
(while
(progn
+ (setq comma-delimited (and (not comma-delim)
+ (eq (char-before) ?\,)))
(unless (c-safe (c-backward-sexp) t)
;; Give up if we hit an unbalanced block. Since the
;; stack won't be empty the code below will report a
;; Just gone back over a brace block?
((and
(eq (char-after) ?{)
+ (not comma-delimited)
(not (c-looking-at-inexpr-block lim nil t))
(save-excursion
(c-backward-token-2 1 t nil)
(if (and (looking-at c-symbol-start)
(not (looking-at c-keywords-regexp)))
(c-backward-token-2 1 t nil))
- (not (looking-at
- c-opt-block-decls-with-vars-key)))))
+ (and
+ (not (looking-at
+ c-opt-block-decls-with-vars-key))
+ (or comma-delim
+ (not (eq (char-after) ?\,)))))))
(save-excursion
(c-forward-sexp) (point)))
;; Just gone back over some paren block?
(c-back-over-member-initializers)
(point)))
(c-most-enclosing-brace state-cache (point))))
- (c-beginning-of-statement-1 lim)
+ (c-beginning-of-statement-1 lim nil nil t)
(c-add-stmt-syntax 'brace-list-intro nil t lim paren-state)))
;; CASE 9D: this is just a later brace-list-entry or