all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Alan Mackenzie <acm@muc.de>
To: Matthias Meulien <orontee@gmail.com>
Cc: 24431@debbugs.gnu.org
Subject: bug#24431: 25.1.50; Wrong indentation in C++ mode when calling constructors with braces
Date: 15 Sep 2016 08:42:34 -0000	[thread overview]
Message-ID: <20160915084234.16623.qmail@mail.muc.de> (raw)
In-Reply-To: <mailman.2380.1473801128.22741.bug-gnu-emacs@gnu.org>

Hello, Matthias

In article <mailman.2380.1473801128.22741.bug-gnu-emacs@gnu.org> you wrote:

> Just type the following lines in a buffer with c++-mode enabled:

> struct line_t;
> struct point_t;

> void set_line(line_t);

> set_line(line_t(point_t(0.4, 0.2),
>                 point_t(0.2, 0.5)));

> set_line(line_t{point_t{0.4, 0.2},
>       point_t{0.2, 0.5}}); // wrong identation

What, exactly, is wrong about that indentation?  What would you like to
see there, and why?

When I do C-c C-s on that last line, I get:

    Syntactic analysis: ((arglist-cont-nonempty 130 138) (defun-block-intro 130) (statement-cont 130))

, which seems to be incorrect, since neither of the anchor points in the
last two of the three elements point at locations within the internal C++
constructs.  Amongst other things.

> In GNU Emacs 25.1.50.2 (x86_64-unknown-linux-gnu, GTK+ Version 3.20.9)
>  of 2016-08-27 built on carbon
> Repository revision: 1c7166a3ba399efbefc65feb8a6a41ef0dfa33a4
> Windowing system distributor 'The X.Org Foundation', version
> 11.0.11804000
> System Description:     Arch Linux

[ .... ]

-- 
Alan Mackenzie (Nuremberg, Germany).






  parent reply	other threads:[~2016-09-15  8:42 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-09-13 21:10 bug#24431: 25.1.50; Wrong indentation in C++ mode when calling constructors with braces Matthias Meulien
     [not found] ` <mailman.2380.1473801128.22741.bug-gnu-emacs@gnu.org>
2016-09-15  8:42   ` Alan Mackenzie [this message]
2016-09-15 12:09     ` Matthias Meulien
2017-01-01 14:32       ` Alan Mackenzie
     [not found]         ` <1484684938.1197.11.camel@gmail.com>
2017-02-01 20:32           ` Alan Mackenzie

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=20160915084234.16623.qmail@mail.muc.de \
    --to=acm@muc.de \
    --cc=24431@debbugs.gnu.org \
    --cc=orontee@gmail.com \
    /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.