[Geany-devel] Changes to templates

Lex Trotman elextr at xxxxx
Sat Mar 19 02:52:46 UTC 2011


On 19 March 2011 13:09, Colomban Wendling <lists.ban at herbesfolles.org> wrote:
> Le 19/03/2011 02:32, Lex Trotman a écrit :
>> On 19 March 2011 10:26, Colomban Wendling <lists.ban at herbesfolles.org> wrote:
>>> Le 18/03/2011 23:52, Lex Trotman a écrit :
>>>> Only comment on the patch is that you have swapped the order of
>>>> frame_end and template_eol_char at the end of the template. (compare
>>>> lines 21 and 67/68 of the patch)
>>>
>>> It was indented actually (not as swapping though):
>>> * I added a line before the frame_end since the template no longer have
>>> a trailing new line.
>>
>> Maybe ok, I don't care up to to others to say.
>
> If we remove the last EOL of the input template, we need to add one
> between the template and the frame end, otherwise that frame end will
> not end up in its own line.

Ok.

>
>>> * I removed the newline after because it added implicitly an extra
>>> newline in e.g. template files (main.c, etc.) after the comment, but
>>> maybe we better keep it (e.g. inserting a template comment adds a new
>>> line); not sure.
>>
>> Needs the eol after the comment close, otherwise if I insert a
>> function description before a function the prototype ends up on the
>> same line as the comment close, yuk.
>

The documentation says that function description is inserted "one line
above" the function, ie a blank line between.  Geany 0.20 does do
this.

> Right, my bad. Maybe this would need to do something different depending
> on whether we're replacing in a template or inserting interactively?

You can only insert a function description interactively so no problem.

AFAICT only BSD GPL and fileheader can be inserted into other
templates and also inserted interactively.

Cheers
Lex

>
> Cheers,
> Colomban
>



More information about the Devel mailing list