[Top][All Lists]

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

Re: Mysterious fontification/C++ context issue

From: martin rudalics
Subject: Re: Mysterious fontification/C++ context issue
Date: Sat, 09 Dec 2006 10:42:11 +0100
User-agent: Mozilla Thunderbird 1.0 (Windows/20041206)

> I don't understand this point (and I don't remember the previous mail).
> What do you think it should say here?

Suppose you have a construct like


...) (bar ...)

and you invoke `beginning-of-defun' from somewhere after "bar".
`beginning-of-defun-raw' will determine that the "defun" starts at the
open paren preceding "bar" but `beginning-of-defun' may return the
position at line beginning which is inside the parens of "foo".

This was a non-issue with the old `beginning-of-defun' which detected a
defun iff there was an opening paren at column zero.

>     2. That a user's idea of "defun" for her programming language does not
>     necessarily coincide with that of `beginning-of-defun'.
> The major mode is supposed to try to make them correspond.
> It seems strange to assume that it doesn't succeed.

If it really succeeded why should C mode ever bother to provide its own

>     foo (...)
>     ...
>     {
>     ...
>     }
>     will now get you two defuns instead of one.
> We're still considering how to change the way C mode handles
> this case, and I don't think that will be true when we are done.

We're still considering how to handle this within `beginning-of-defun',
not necessarily in C mode.

> Anyway, this is not the right place to discuss what happens in
> specific modes.

The current change affects the behavior of `beginning-of-defun' which
may affect other modes as well.

reply via email to

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