mirror of
git://git.sv.gnu.org/emacs.git
synced 2025-12-15 10:30:25 -08:00
C++ Mode: recognize brace blocks without the hitherto required = sign
* lisp/progmodes/cc-engine.el (c-looking-at-or-maybe-in-bracelist): Add code to recognize a literal brace expression following an array declaration for C++. (c-looking-at-inexpr-block): Replace c-symbol-chars with c-symbol-char-key, fixing a coding error.
This commit is contained in:
parent
b318e58d28
commit
9b995320c8
1 changed files with 11 additions and 2 deletions
|
|
@ -11685,7 +11685,16 @@ comment at the start of cc-engine.el for more info."
|
|||
(not (c-in-literal))
|
||||
))))
|
||||
nil)
|
||||
(t t))))))
|
||||
(t t)))))
|
||||
((and
|
||||
(c-major-mode-is 'c++-mode)
|
||||
(eq (char-after) ?\[)
|
||||
;; Be careful of "operator []"
|
||||
(not (save-excursion
|
||||
(c-backward-token-2 1 nil lim)
|
||||
(looking-at c-opt-op-identifier-prefix))))
|
||||
(setq braceassignp t)
|
||||
nil))
|
||||
(when (eq braceassignp 'dontknow)
|
||||
(cond ((and
|
||||
(not (eq (char-after) ?,))
|
||||
|
|
@ -12057,7 +12066,7 @@ comment at the start of cc-engine.el for more info."
|
|||
(c-backward-token-2 1 nil lim)
|
||||
(and
|
||||
(not (and (c-on-identifier)
|
||||
(looking-at c-symbol-chars)))
|
||||
(looking-at c-symbol-char-key)))
|
||||
(not (looking-at c-opt-op-identifier-prefix)))))))
|
||||
(cons 'inlambda bracket-pos))
|
||||
((and c-recognize-paren-inexpr-blocks
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue