Scott Smedley <[EMAIL PROTECTED]> writes:
> > >  * Please put single statements in loops or if clauses in curly
> > >    braces, i.e.
> > > 
> > >      if (1)
> > >      {
> > >        foo;
> > >      }
> > > 
> > >    not
> > > 
> > >      if (1)
> > >        foo;
> > 
> > What's the rationale behind this? I must confess I'm not particularly fond
> > of this restriction but I will, of course, follow any FVWM coding standards
> .
> 
>  o Always place curly braces on a separate line.  In some cases,
>    placing braces on the same line as other code confuses
>    (x)emacs.
> 
> Wouldn't it be prudent to fix Emacs?
> 
> (That's an honest question, not trying to start an xemacs-vs-gvim war.)

I don't think Emacs has anything to do with it.
As far as I can tell, Emacs has no problems with either format.
Certainly someone would submit a bug report if there was a problem.

I think the above choices are personal preference.
Personally, I like curly braces to NOT take an extra line.
There are sound arguments to be made on both sides.

This is what I put in my .emacs to allow Emacs to follow the
fvwm standard for fvwm work, and for me to use my own rules for
everything else:

;set my defaults for c
(defun my-c-mode-hook ()
  (if (string-match "fvwm" buffer-file-name) ;fvwm project settings:
      (progn
        (setq
         c-indent-level 8
         c-basic-offset 8
         c-brace-offset 0
         c-continued-brace-offset 0
         c-brace-imaginary-offset 0
         c-continued-statement-offset 0
         c-label-offset 0
         c-argdecl-indent 0
         c-auto-newline nil
         c-tab-always-indent t
         indent-tabs-mode t)
         (c-set-offset 'substatement-open 0))
    ;; Local site default settings
    (setq 
     c-indent-level 2
     c-basic-offset 2
     c-brace-offset 0
     c-continued-brace-offset 0
     c-brace-imaginary-offset 0
     c-continued-statement-offset 2
     c-label-offset -2
     c-argdecl-indent 0
     c-auto-newline nil
     c-tab-always-indent t
     indent-tabs-mode nil
     comment-column 40)))
(add-hook 'c-mode-hook 'my-c-mode-hook t)


-- 
Dan Espen                           E-mail: [EMAIL PROTECTED]
--
Visit the official FVWM web page at <URL:http://www.fvwm.org/>.
To unsubscribe from the list, send "unsubscribe fvwm-workers" in the
body of a message to [EMAIL PROTECTED]
To report problems, send mail to [EMAIL PROTECTED]

Reply via email to