title: Auto-formatting a source file in emacs
body: <p>How do I apply a set of formatting rules to an existing source file in emacs?</p>
  
  <p>Specifically I have an assembly (<code>*.s</code>) file, but I would like a generic command for all types of files.</p>
  
  <p>I am trying to use <code>M-x c-set-style</code> with <code>gnu</code> style, but I am getting an error:</p>
  
  <blockquote>
    <blockquote>
      <p>Buffer *.s is not a CC Mode buffer (c-set-style)</p>
    </blockquote>
  </blockquote>