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

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

indentation messed up by comments


From: Min Ouyang
Subject: indentation messed up by comments
Date: Wed, 4 Apr 2001 15:30:48 -0700

Hi,

Here is what I got for C++:

foo()
{
  //comment
    int foo_int;
}

please note that "int" should start at the same indentation as //comment, but it's two spaces off (my c-basic-offset is 2).  When type C-c C-s at right before "int", I got:

Wrong number of arguments: #[nil .....

If the comment ends with ";" then emacs indents the next line as if the comment is a  line of c++ code: i.e.

foo()
{
  //comment;
  int foo_int;
  if(...)
    //comment after if;
  foot_int=1;
}

please note that "foo_int=1;" should be indented the same as "//comment after if".

Please help. Thanks a lot.

Min Ouyang
  


reply via email to

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