unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Dima Kogan <dima@secretsauce.net>
To: 15728@debbugs.gnu.org
Subject: bug#15728: 24.3.50; cc-mode incorrectly parses particular macro
Date: Sat, 26 Oct 2013 21:16:12 -0700	[thread overview]
Message-ID: <87d2mr1h83.fsf@secretsauce.net> (raw)

I have the following source file:

=========================================================================
int f(void)
{
#define A(b)								\
  int abc ## b;								\
    g()
}
=========================================================================

This indentation is what the latest emacs thinks is correct. Note that
the g() line is indented ahead of the 'int abc' line. This is wrong;
they should have the same indentation. Indeed this is what happens with
emacs23.

In the latest emacs the syntax parser thinks the g() line is
'statement-cont', instead of 'statement'; this is directly related to
the issue. Furthermore, the 'abc ## b' construct is what's confusing the
parser. Removing the '##' makes it parse correctly again.

I'm observing this issue with all emacs24 builds I've tried, with 'emacs
-Q'.





             reply	other threads:[~2013-10-27  4:16 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-10-27  4:16 Dima Kogan [this message]
2013-10-27 13:49 ` bug#15728: bug #15728: 24.3.50; cc-mode incorrectly parses particular macro Alan Mackenzie
2013-10-27 18:45   ` Dima Kogan
2013-10-27 21:51 ` 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

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87d2mr1h83.fsf@secretsauce.net \
    --to=dima@secretsauce.net \
    --cc=15728@debbugs.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 public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).