all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* Strange indent of preprocessor lines in c-mode
@ 2008-10-08  8:19 Damien Deville
  2008-10-13 18:47 ` Alan Mackenzie
  0 siblings, 1 reply; 3+ messages in thread
From: Damien Deville @ 2008-10-08  8:19 UTC (permalink / raw
  To: emacs-devel

Hi,

I noticed the following weirdness on a checkout from todays emacs 23 cvs.

- Consider the program given a the end of the mail
- open it with emacs -q
- activate c-mode
- Select all lines
- launch indent-region
- noticed how the #ifdef and #endif are ended by a "\" as if 
c-backslash-region was called.

I never noticed it before, Is it normal or is it a bug ? If it is normal 
how can it be disabled ?

On big program it totally screws up the indentation

#include <stdio.h>

int main(int argc, char *argv[])
{
#ifdef TOTO
   return 1;
#endif
   return 0;
}

Thanks in advance

-- 
Damien Deville
R&D engineer
damien.deville@netasq.com
http://www.netasq.com

NETASQ - We secure IT




^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Strange indent of preprocessor lines in c-mode
  2008-10-08  8:19 Strange indent of preprocessor lines in c-mode Damien Deville
@ 2008-10-13 18:47 ` Alan Mackenzie
  2008-10-16  8:41   ` Damien Deville
  0 siblings, 1 reply; 3+ messages in thread
From: Alan Mackenzie @ 2008-10-13 18:47 UTC (permalink / raw
  To: Damien Deville; +Cc: emacs-devel

Hi, Damien,

On Wed, Oct 08, 2008 at 10:19:13AM +0200, Damien Deville wrote:
> Hi,

> I noticed the following weirdness on a checkout from todays emacs 23 cvs.

> - Consider the program given a the end of the mail
> - open it with emacs -q
> - activate c-mode
> - Select all lines
> - launch indent-region
> - noticed how the #ifdef and #endif are ended by a "\" as if 
> c-backslash-region was called.

> I never noticed it before, Is it normal or is it a bug ? If it is normal 
> how can it be disabled ?

It's a bug.  I've just committed a fix to the CVS at Savannah.  The
faulty file was ..../lisp/progmodes/cc-cmds.el.

Could you please try this out and confirm that the bug has been fixed.
Thanks!

And thanks indeed for such a concise, high-quality bug report.

> -- 
> Damien Deville

-- 
Alan Mackenzie (Nuremberg, Germany).




^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Strange indent of preprocessor lines in c-mode
  2008-10-13 18:47 ` Alan Mackenzie
@ 2008-10-16  8:41   ` Damien Deville
  0 siblings, 0 replies; 3+ messages in thread
From: Damien Deville @ 2008-10-16  8:41 UTC (permalink / raw
  To: Alan Mackenzie; +Cc: emacs-devel

Hi Alan,

I did some quick tests and it seem to fix it.

Thanks,
Damien

Alan Mackenzie wrote:
> Hi, Damien,
> 
> On Wed, Oct 08, 2008 at 10:19:13AM +0200, Damien Deville wrote:
>> Hi,
> 
>> I noticed the following weirdness on a checkout from todays emacs 23 cvs.
> 
>> - Consider the program given a the end of the mail
>> - open it with emacs -q
>> - activate c-mode
>> - Select all lines
>> - launch indent-region
>> - noticed how the #ifdef and #endif are ended by a "\" as if 
>> c-backslash-region was called.
> 
>> I never noticed it before, Is it normal or is it a bug ? If it is normal 
>> how can it be disabled ?
> 
> It's a bug.  I've just committed a fix to the CVS at Savannah.  The
> faulty file was ..../lisp/progmodes/cc-cmds.el.
> 
> Could you please try this out and confirm that the bug has been fixed.
> Thanks!
> 
> And thanks indeed for such a concise, high-quality bug report.
> 
>> -- 
>> Damien Deville
> 

-- 
Damien Deville
R&D engineer
damien.deville@netasq.com
http://www.netasq.com

NETASQ - We secure IT




^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2008-10-16  8:41 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-10-08  8:19 Strange indent of preprocessor lines in c-mode Damien Deville
2008-10-13 18:47 ` Alan Mackenzie
2008-10-16  8:41   ` Damien Deville

Code repositories for project(s) associated with this external index

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

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.