[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Font-lock decides function call is function declaration in C+ +
From: |
Stefan Monnier |
Subject: |
Re: Font-lock decides function call is function declaration in C+ + |
Date: |
Mon, 12 Feb 2007 11:17:51 -0500 |
User-agent: |
Gnus/5.11 (Gnus v5.11) Emacs/22.0.93 (gnu/linux) |
>> Yes, unfortunately, I think that if you try to learn types on-the-fly then
>> you will always be vulnerable to this sort of problem. The issue is that
>> cc-mode needs to know as soon as a change invalidates it as a candidate
>> type
>> (ie, deletion of some/all of the text "foo" or interruption of the
>> whitespace between "foo" and its candidate identifier "bar"). I can think
>> of a few ways you could attempt to do it, but they are a bit intensive and
>> far from simple.
> It's worse than that. Inserting a new letter that changes "foo", or
> transposing two characters 3k back in the buffer that cause the whole
> region to become a comment, or deleting "bar", or exchanging "foo" and
> "bar", or merely exchanging 'f' and 'o', or adding #define in front of
> "foo", or... any of which could be done as one change by an appropriate
> Lisp helper function.
Yes, of course, the case of commenting code needs to be handled as well, but
re-using the font-lock machinery makes it "somewhat painless".
Stefan
- Re: Font-lock decides function call is function declaration in C+ +, (continued)
- Re: Font-lock decides function call is function declaration in C+ +, Alan Mackenzie, 2007/02/11
- Re: Font-lock decides function call is function declaration in C+ +, Stefan Monnier, 2007/02/11
- Re: Font-lock decides function call is function declaration in C+ +, Chong Yidong, 2007/02/11
- Re: Font-lock decides function call is function declaration in C+ +, Stefan Monnier, 2007/02/11
- Re: Font-lock decides function call is function declaration in C+ +, Alan Mackenzie, 2007/02/12
Re: Font-lock decides function call is function declaration in C+ + - embryonic solution., Alan Mackenzie, 2007/02/22
RE: Font-lock decides function call is function declaration in C+ +, Marshall, Simon, 2007/02/09
Re: Font-lock decides function call is function declaration in C+ +, Chong Yidong, 2007/02/11
RE: Font-lock decides function call is function declaration in C+ +, Marshall, Simon, 2007/02/12