emacs-devel
[Top][All Lists]
Advanced

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

Re: On the behavior of `c-beginning-of-defun'


From: Alan Mackenzie
Subject: Re: On the behavior of `c-beginning-of-defun'
Date: 20 Jan 2007 20:37:53 +0100
Date: Sat, 20 Jan 2007 20:50:53 +0000
User-agent: Mutt/1.5.9i

Hi, Guanpeng!

On Sat, Dec 30, 2006 at 12:09:55PM +0800, Herbert Euler wrote:

[ .... ]

> I planned to use `c-beginning-of-defun' and `c-end-of-defun'.  But I
> found a strange behavior of `c-beginning-of-defun'.  In the attatched
> `x.c' file, `c-beginning-of-defun' moves point differently for the
> function `main' and others.  For the `main' function, it moves point to
> the open of the function body, i.e. before the { at line 6; for other
> functions, it moves point to the beginning of the definition of the
> function, i.e. before the type specification of the return value of the
> function.

[ .... ]

I've fixed this bug, basically by analysing K&R regions much more
rigorously.  I've just committed cc-defs.el and cc-engine.el to
savannah.gnu.org.

Please try out the amended version and let me know if anything's not
right.

> Thanks in advance.

Thank you for the bug report!

> int
> main (argc, argv)
>      int argc;
>      char *argv[];
> {
>   if ()
>     ;
> }

-- 
Alan Mackenzie (Ittersbach, Germany).




reply via email to

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