Subject: bug#18970: 24.3; indent region fails in C++ mode after adding a #include

From: Piotr Sipika <[email-masked]>
Date: Thu, 06 Nov 2014 08:53:41 -0500

Hi Alan,

On 11/06/2014 06:54 AM, Alan Mackenzie wrote:
> This bug will be dependent on the exact contents of the file, or at least
> the first few hundred or thousand bytes in it.  Is there any chance you
> could post the file as it was just before you edited it in step 1., and
> say exactly what keys you used for 1. - 4.?
Certainly.

The steps were:
1. Edited a C++ header file in a buffer.
The file is attached (resource.h)

2. Switched to another buffer.
C-x b [ENTER]
(possibly edited the other buffer, but don't recall the exact keys...)

3. Went back to buffer in #1, above.
C-x b [ENTER]

4. Added a #include to the top of the buffer.
Went to line 9, moved the two #include's there down using [ENTER] (twice).
Added: #include <pthread.h> [ENTER]
Saved buffer: C-x C-s

5. Indentation for all code blocks following the include, when using
TAB, resets to line 0.
Went down to the declaration of findLocation() and hit [TAB]; the
function ended up being moved to line 0.

> Thanks!
Hope this helps...

Cheers,
Piotr