[Top][All Lists]
[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: |
21 Jan 2007 20:33:56 +0100 |
Date: |
Sun, 21 Jan 2007 20:47:01 +0000 |
User-agent: |
Mutt/1.5.9i |
Hi, Guanpeng!
On Sun, Jan 21, 2007 at 09:19:44AM +0800, Herbert Euler wrote:
> >Please try out the amended version and let me know if anything's not
> >right.
> I did not test all cases but only the case that function
> `c-beginning-of-defun' fails. I think it is almost Ok. However,
> please try the following case, it might be a bug.
Yes. It's a bug.
> Suppose `-!-' indicates the position of point.
[ .... ]
> But if point is just after ``[]'':
>
> /* 1. K&R C. */
>
> /* This will not get correct result until the bug in CC mode is fixed.
> See
> http://lists.gnu.org/archive/html/emacs-devel/2006-12/msg01341.html
> */
> int
> main1 (argc, argv)
> int argc;
> char *argv[]-!-;
> {
> /* ... */
> }
>
> `c-beginning-of-defun' moves point to the start of the file, rather
> than the desired position.
I've patched cc-cmds.el, which should fix the bug, and committed this to
savannah. Please try it out again!
> This is the only problem I can see until now. Thank you very much.
> Regards,
> Guanpeng Xu
--
Alan Mackenzie (Ittersbach, Germany).