From: "Herbert Euler" <address@hidden>
To: address@hidden, address@hidden
CC: address@hidden, address@hidden, address@hidden
Subject: Re: On the behavior of `c-beginning-of-defun'
Date: Sun, 21 Jan 2007 09:19:44 +0800
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.
Suppose `-!-' indicates the position of point. If point is, for
example, in the body of function `main1':
/* 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[];
{
-!-/* ... */
}
Then `c-beginning-of-defun' moves point to before ``int'':
/* 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[];
{
/* ... */
}
Which is a desired behavior. 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.
This is the only problem I can see until now. Thank you very much.
Regards,
Guanpeng Xu
_________________________________________________________________
FREE pop-up blocking with the new MSN Toolbar - get it now!
http://toolbar.msn.click-url.com/go/onm00200415ave/direct/01/