diff options
author | Alan Mackenzie <acm@muc.de> | 2017-11-09 18:34:13 +0000 |
---|---|---|
committer | Alan Mackenzie <acm@muc.de> | 2017-11-09 18:34:13 +0000 |
commit | fc56bea1420266ea6495a2e74df28349458b6fb0 (patch) | |
tree | cfd5d9785a0c9b39e32d3ade48c1f0a443efc942 /lisp/erc/erc-lang.el | |
parent | 9dde8be9cd8dc9defdae282ed24eaf2dd6bf4c31 (diff) | |
download | emacs-fc56bea1420266ea6495a2e74df28349458b6fb0.tar.gz emacs-fc56bea1420266ea6495a2e74df28349458b6fb0.tar.bz2 emacs-fc56bea1420266ea6495a2e74df28349458b6fb0.zip |
Correctly indent C++14 brace lists which are a second argument to a function.
In particular, don't indent contained brace lists in "staircase" fashion.
This fixes bug #28623.
* lisp/progmodes/cc-engine.el (c-looking-at-or-maybe-in-bracelist): When
testing for being enclosed in parens, recognise also a brace directly
following a comma, as well as a brace being the first thing inside the paren.
Enhance the return value, by indicating when we're directly inside an open
paren.
(c-inside-bracelist-p): Add an extra argument ACCEPT-IN-PARAM which indicates
whether we will accept a bracelist directly inside an open parenthesis.
Simplify the manipulation of PAREN-STATE by dispensing with variable LIM and
using c-pull-open-brace. Enhance the return value, respecting the new argument.
(c-guess-basic-syntax): Save a copy of the initial parse-state in the new
variable STATE-CACHE. Use this variable in place of C-STATE-CACHE throughout
the function. At CASE 7B, call c-inside-bracelist-p with extra argument nil.
At CASE 9, call that function with extra argument t.
Diffstat (limited to 'lisp/erc/erc-lang.el')
0 files changed, 0 insertions, 0 deletions