title: Emacs return to indented code line when press 'return' key
body: <p>I am using emacs 22.2.1 and Ubuntu 9.04</p>
  
  <p>I have done this in my .emacs file. Which indents and creates a new line each time I press ';' or '{ }'</p>
  
  <pre><code>if(success == 0)
  {
      printf("Success\n");
      &lt;---- if I press return key here it will go
  &lt;-- to here, and I have to tab to go to the code line.
  </code></pre>
  
  <p>However, if I press the return key it will take me to column 0 not the indent line of code I am working on i.e.</p>
  
  <pre><code>(require 'cc-mode)
  
  ;; Auto indent on insertion of a curly brace
  (add-hook 'c-mode-hook '(lambda()
   (c-toggle-auto-state t)))
  
  ;; Set coding style to indent 4 spaces
  (setq c-default-style "bsd"
    c-basic-offset 4)
  </code></pre>