GNU bug report logs - #18970
24.3; indent region fails in C++ mode after adding a #include

Previous Next

Packages: cc-mode, emacs;

Reported by: Piotr Sipika <piotr.sipika <at> gmail.com>

Date: Thu, 6 Nov 2014 03:46:02 UTC

Severity: normal

Found in version 24.3

Done: Alan Mackenzie <acm <at> muc.de>

Bug is archived. No further changes may be made.

Full log


Message #14 received at 18970 <at> debbugs.gnu.org (full text, mbox):

From: Piotr Sipika <piotr.sipika <at> gmail.com>
To: Alan Mackenzie <acm <at> muc.de>
Cc: 18970 <at> debbugs.gnu.org
Subject: Re: bug#18970: 24.3;	indent region fails in C++ mode after adding
 a #include
Date: Fri, 07 Nov 2014 11:14:21 -0500
[Message part 1 (text/plain, inline)]
Alan, here's another instance of the problem:

> The steps were:
> 1. Edited a C++ header file in a buffer.
The file is attached (libxmlparser.h).
I've had it open in a buffer for a while and have edited it successfully
(without the indentation problem) within the current emacs session.
I just switched to it from another buffer.

> 4. Added a #include to the top of the buffer.
4.1 I added a newline on line 8.
4.2 I then added another #include (pasted using C-y): #include
<libxml/xpath.h>
4.3 I then added another newline under the new #include.

> 5. Indentation for all code blocks following the include, when using
Tested line 14 (of the updated file) with a [TAB] and noticed the
forward declaration got moved to column 0.

When I undo all changes (steps 4.3 to 4.1), indentation is OK (remains
at respective column). When I repeat the steps, indentation gets moved
to column 0.

Best!
Piotr

[libxmlparser.h (text/plain, attachment)]

This bug report was last modified 10 years and 199 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.