[Geany-devel] Changes to templates

Thomas Martitz thomas.martitz at xxxxx
Wed Mar 16 09:57:47 UTC 2011


On 16.03.2011 00:29, Lex Trotman wrote:
>
>>>>>> Fix filetypes.c to use /* */ style comments rather than C++ style
>>>>>> comments.
>>>>> I'd personally agree with this change, but it has a drawback: multi-line
>>>>> C comments can't be nested. So the comment/un-comment command becomes a
>>>>> little less useful since it'd break if commenting stuff including
>>>>> comments.
> My Geany comments C code with // so nesting can be infinite and that
> makes function headers as /* comments */ fine and works on C99 +
> compilers and the inserted function headers work on all compilers.
>
> When compilers won't let you use // to comment out blocks and you
> can't nest /* comments */ then thats a limitation of that version of
> the language and no matter what Geany does you will always have to
> comment around other comments.
>
> So I'd agree with Matthew that the built in functionality should
> support the lowest common denominator.


FWIW, C99 is the current standard in effect, since more than a decade 
already, and thus //-style comments are perfectly valid. It's not 
Geany's fault if you can't use them.

For CTRL+E, it's user configurable even, isn't it? Then I see no 
problem. But defaulting to //-style seems sane because it's very 
annoying to work around the nested comment problem.

But for templates /* */-style should be used, I agree.

Best regards.



More information about the Devel mailing list