From: Alan Mackenzie <acm@muc.de>
To: help-gnu-emacs@gnu.org
Subject: Re: Complex indentation configuration issue
Date: Thu, 20 Dec 2018 16:31:30 -0000 (UTC) [thread overview]
Message-ID: <pvgg52$1i0f$1@news.muc.de> (raw)
In-Reply-To: pvafpo$1k4c$1@adenine.netfront.net
Hello, Juha.
Juha Nieminen <nospam@thanks.invalid> wrote:
> I want this type of code to be indented like this:
> functionCall
> (param1, param2,
> {
> value1,
> value2,
> value3
> });
> My emacs, however, is currently indenting it like this:
> functionCall
> (param1, param2,
> {
> value1,
> value2,
> value3
> });
> I have used the C-c C-o trick to find out (and change) which indentation
> parameter is being used for the offending lines, and it appears to be
> statement-cont, which has a value of +.
OK. It shouldn't be statement-cont (a "continued statement") but
brace-list-entry. This was a tricky problem back in late 2017 which was
"solved" and then reverted for Emacs 26, and later solved properly, but
only on the master branch.
> If I change it to 0, then the "value2" and "value3" lines get properly
> indented, but the problem is that the second line is also indented using
> that same parameter (not a huge problem but...), as well as the closing
> curly bracket (more of a problem). There are probably also other
> situations that would probably be negatively affected by this change.
> Any suggestions?
FIrst of all, it is always helpful, and sometimes essential, to give the
version numbers of the software you're using. Here I've had to guess
that you're using Emacs 26.1 (or earlier), that you're in C Mode or C++
Mode (this was given away by the mention of C-c C-o).
I would suggest one of four ways of solving this: you could move onto
the (unreleased) Emacs master; you could extract the up to date CC Mode
source files from master, and put them into your current Emacs; You
could download the current version of (stand alone) CC Mode from
SourceForge (see http://cc-mode.sourceforge.net/hgaccess.php); or ask me
by private email to send you a tarball of the latter.
--
Alan Mackenzie (Nuremberg, Germany).
prev parent reply other threads:[~2018-12-20 16:31 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-12-18 9:48 Complex indentation configuration issue Juha Nieminen
2018-12-20 16:31 ` Alan Mackenzie [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to='pvgg52$1i0f$1@news.muc.de' \
--to=acm@muc.de \
--cc=help-gnu-emacs@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.