On Sun, Jul 11, 2004 at 11:19:55AM -0400, Dan Espen wrote:
> Dominik Vogt <[EMAIL PROTECTED]> writes:
> > On Sat, Jul 10, 2004 at 06:42:24PM +1000, Scott Smedley wrote:
> > > > >  * Please put single statements in loops or if clauses in curly
> > > > >    braces, i.e.
> > > > >=20
> > > > >      if (1)
> > > > >      {
> > > > >        foo;
> > > > >      }
> > > > >=20
> > > > >    not
> > > > >=20
> > > > >      if (1)
> > > > >        foo;
> ...
> > > >From docs/CONVENTIONS:
> > >
> > >  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?
> > 
> > The question is:  who is going to do it?  I don't know how to fix
> > it.  One case in which xemacs misbehaves is when you have such a
> > function:
> > 
> >   void foo(void) {
> >     ...
> >   }
> > 
> > If you press C-x 4 a to generate a ChangeLog entry, it does not
> > find the function's name.
> 
> So thats why a few things I try to do in Emacs don't work.
> The underlying brokenness is in "beginning-of-defun" which is
> widely used, for example, by C-x 4 a.
> Emacs often has to go back to the beginning of
> the function to figure out what it is looking at.
> 
> The default pattern for beginning-of_defun is to just look for
> "{" in the first column.  That can be overridden by setting
> defun-prompt-regexp but my few attempts were failures.
> 
> I see this is a known issue, and after reading this:
> 
> http://w3.pppl.gov/info/ccmode/Performance_Issues.html
> 
> I'm pretty much convinced that the curly brace in column 1 for
> functions is an Emacs requirement.

It's not only emacs, other C tools need it too.  I think cscope is
one of them.

Ciao

Dominik ^_^  ^_^

 --
Dominik Vogt, [EMAIL PROTECTED]
Reply-To: [EMAIL PROTECTED]

Attachment: pgpgKJeoap7hU.pgp
Description: PGP signature

Reply via email to