bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Indentation problem in CC Mode (C++) 5.25


From: Michael Marsh
Subject: Indentation problem in CC Mode (C++) 5.25
Date: Fri, 2 Aug 2002 14:39:32 -0400

This bug report will be sent to the Free Software Foundation,
 not to your local site managers!!
Please write in English, because the Emacs maintainers do not have
translators to read other languages for them.

In GNU Emacs 20.7.1 (i386-redhat-linux-gnu, X toolkit)
 of Mon Jul 30 2001 on stripples.devel.redhat.com
configured using `configure  --mandir=/usr/share/man --infodir=/usr/share/info 
--prefix=/usr --libexecdir=/usr/lib --sharedstatedir=/var --with-gcc --with-pop 
--with-x-toolkit i386-redhat-linux-gnu'

Please describe exactly what actions triggered the bug
and the precise symptoms of the bug:

Dear Martin,

I am using CC Mode with files that have been marked up for processing
by the Doxygen documentation generator, and consequently have some
odd-looking comment blocks.  The problems that I see occur with
CC Mode 5.25, and are reproducible starting from "emacs -q", loading
the file I have included with C-x C-f, and typing
M-x c++-mode
M-x c-set-style ellemtel

I am not sure if it behaves similarly in other indentation styles.  I
looked through the changes listed through the current version of CC Mode
on http://cc-mode.sourceforge.net, and didn't see anything that was
obviously related to this.

There are, specifically, three indentation problems, which are illustrated
in the classes One, Two, and Three provided.  The class FixesOne includes
an additional line that causes indentation to function properly.  Errors
are indicated on the lines in which they occur by C++-style comments
(ie, not block comments) in ALL CAPS.  All lines are currently indented
as I believe they should be.  The current indentation in comment blocks
is important, though the problem illustrated in class Three depends on
the specific position of the backslash.  Problem-labelling comments do
not affect the (mis-)indentation of the lines on which they appear.

Please let me know if there's any additional information that you require.

Thanks,
Mike Marsh

---------8<--( begin sample.h )--------
class One
{
   public :
      /*
       * This is an odd comment block
{
}
       *
       */
      void a(); // SHIFTS TO THE LEFT
};

class FixesOne
{
   public :
      typedef int Int;

      /*
       * This is an odd comment block
{
}
       *
       */
      void a();
};

class Two
{
   public :
      typedef int Int;

      /*
       * This is an odd comment block
{
}
       *
       */
      void a();

      /*
       * This is another odd comment block
{
}
       *
       */
      void b();
      void c(); // FLUSH LEFT
};

class Three
{
   public:
      typedef int Int;

      /*
       * This is a more odd comment block
{
}
       \a
       *
       */
      void a();

      /*
       * This is a more odd comment block
{
}
       *
       */
      void b(); // ALIGNED WITH BACKSLASH AT END OF PREVIOUS BLOCK
      void c(); // FLUSH LEFT
};

---------8<---( end sample.h )---------

Recent input:
down tab down tab down tab down down tab down tab down 
down down down tab down tab left backspace up up up 
up up up up up up up up SPC SPC down down down down 
down down down down down down down tab left left backspace 
backspace backspace up up up up up up up up up up up 
backspace backspace down down down down down down down 
down down down down down tab SPC SPC SPC SPC SPC SPC 
down down down down backspace backspace C-x C-s M-x 
r e p tab o tab r tab return

Recent messages:
Making completion list...
Loading view...
Loading view...done
Making completion list... [8 times]
Auto-saving...
Auto-saving...done
Wrote /usr/u/mmarsh/src/Quorum/sample.h
Making completion list... [2 times]
Loading emacsbug...
Loading emacsbug...done



reply via email to

[Prev in Thread] Current Thread [Next in Thread]