On Wed, 29 Nov 2006 09:07:40 +0800 [EMAIL PROTECTED] wrote:
> > E.g. if I have
> >
> > // function foo() does whatever it does
> > ~~~
> > void foo() { ... }
>
> Generally, it is not a good practice to use // or /* */ to comment out
> codes. (a better approach might be "#if 0" and "#endif"), so if you use #if
> 0 there would not be problem.
Thanks, but I probably didn't explain clearly enough: I don't ask about
commented out code. My question is about identifiers appearing in the real
comments (as is quite often the case). E.g. for a maybe more clear example,
consider a comment like this one:
// this function does the same as foo() but checks if the pointer
// is NULL first
void foo_safe(void *p) { ... }
In the above _comment_ "foo" is highlighted as a misspelling which is very
annoying.
> If you just want all identifiers to be valid word, there has been somewhere
> a method to permenantly add all identifiers in a tags file to your
> dictionary. But it is inconvinient, since tags file will change frequently,
> and you may want to use different tags file with different project.
Indeed, it's very inconvenient. And I don't know of any easy way to add
the identifiers from tags file to the internal word list. And, worse, not
all identifiers are included in the tags file. E.g. static function or
parameter names are not.
It really looks like a mechanism is needed to check if a misspelt word
doesn't appear elsewhere in the file outside of the comment... But I just
don't see how could this be done. OTOH I have trouble believing it's
impossible to do it, how do people use 'spell' option with program sources
without being able to do it?
Thanks,
VZ