From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Alan Mackenzie Newsgroups: gmane.emacs.help Subject: Re: Complex indentation configuration issue Date: Thu, 20 Dec 2018 16:31:30 -0000 (UTC) Organization: muc.de e.V. Message-ID: References: NNTP-Posting-Host: blaine.gmane.org X-Trace: blaine.gmane.org 1545324195 9345 195.159.176.226 (20 Dec 2018 16:43:15 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Thu, 20 Dec 2018 16:43:15 +0000 (UTC) Injection-Date: Thu, 20 Dec 2018 16:31:30 -0000 (UTC) User-Agent: tin/2.4.2-20171224 ("Lochhead") (UNIX) (FreeBSD/11.2-RELEASE-p4 (amd64)) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Thu Dec 20 17:43:11 2018 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ga1Pi-0002G4-23 for geh-help-gnu-emacs@m.gmane.org; Thu, 20 Dec 2018 17:43:10 +0100 Original-Received: from localhost ([::1]:38639 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ga1Ro-0000B2-Kx for geh-help-gnu-emacs@m.gmane.org; Thu, 20 Dec 2018 11:45:20 -0500 Original-Path: usenet.stanford.edu!goblin3!goblin.stu.neva.ru!news.tu-darmstadt.de!news.muc.de!.POSTED.192.168.0.4!not-for-mail Original-Newsgroups: gnu.emacs.help Original-Injection-Info: news.muc.de; posting-host="192.168.0.4"; logging-data="51215"; mail-complaints-to="news-admin@muc.de" Original-Xref: usenet.stanford.edu gnu.emacs.help:224885 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Original-Sender: "help-gnu-emacs" Xref: news.gmane.org gmane.emacs.help:119014 Archived-At: Hello, Juha. Juha Nieminen 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).