[Top][All Lists]

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

Re: CC Mode 5.31.4 (C/l); c-end-of-defun broken

From: Chong Yidong
Subject: Re: CC Mode 5.31.4 (C/l); c-end-of-defun broken
Date: Wed, 18 Apr 2007 16:43:15 -0400
User-agent: Gnus/5.11 (Gnus v5.11) Emacs/22.0.98 (gnu/linux)

Hi Alan,

> Could people please test this fix (which I haven't yet committed):

The behavior seems to be correct, as far as I can tell.  However:

> !             ;; Look for struct or union or ...  If we find one, it might
> !             ;; be the return type of a function, or the like.  Exclude
> !             ;; this case.
> !             (c-syntactic-re-search-forward
> !              (concat "[;=\(\[{]\\|\\("
> !                      c-opt-block-decls-with-vars-key
> !                      "\\)")
> !              lim t t t)

Do you really want to use `lim' here?  That argument, if non-nil, is
supposed to give a lower bound for the search, starting from point.  I
think the correct limit you are looking for is the original point
where we started.

(In fact, c-in-function-trailer-p is not called with a non-nil
argument anywhere in Emacs, so this bug wouldn't show up, but it's
better to be safe than sorry.)

Similarly here:

> !             (c-syntactic-re-search-forward "[;=\(\[{]" lim t t t)

reply via email to

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