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

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

Indentation for "{" and "}"


From: Rafal Kurcz
Subject: Indentation for "{" and "}"
Date: Sun, 29 Jul 2007 10:23:45 -0700
User-agent: G2/1.0

Hello

I want my C++ code to look as follows:

void function()
{
  printf ( "hello" );
}

and not look as follows:

void function()
  {
    pirntf ( "hello" );
  }

I added the following setting to my ~/.emacs file:
(global-set-key "\C-m" 'newline-and-indent)

It works fine for all lines but "{".
How to tell emacs not to indent the lines with "{" and "}"

Thanks for help



reply via email to

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