Alt+Shift+C for Procedure completion and updation lazarus / 9-Editor ---------------------------------------------------------------------- motaz · 2013-01-04 08:42 I always use Alt + Shift + C for new procedure/function header to generate procedure body in implementation section. For example suppose that I wrote this procedure header in public section in a form class: Code: [Select]    procedure Sum(a, b: Integer; c: Integer = 0; d: Integer = 0); Then When I click Alt + Shift + C at this line I get this in implementation part: Code: [Select]procedure TForm1.Sum(a, b: Integer; c: Integer; d: Integer); begin end; Note that the default parameters value are not there, but it is still no problem, because these parameters are still considered as optional and has default values. The problem starts when I do modifications in procedure implementation header, for example when I added another default parameters and pressed Alt + Shift + C at procedure header: Code: [Select]procedure TForm1.Sum(a, b: Integer; c: Integer; d: Integer; f: Integer = 0); begin end; I get this modification in form's public section declaration: Code: [Select]    procedure Sum(a, b: Integer; c: Integer; d: Integer; f: Integer=0); The default values for C and D are gone, and these parameters are not considered optional any more. Can I prevent this editor behaviour by forcing it to put default values in implementation section when using Alt + Shift + C at first place. Is there any configuration that can be done in Lazarus editor? Thanks Motaz ---------------------------------------------------------------------- User137 · 2013-01-04 09:22 Default values are written only in the header section. Only exception is a lonely function with no header at all, which can have default values described in it. ---------------------------------------------------------------------- motaz · 2013-01-04 11:34 I can write default values manually in implementation section, as the example above, and this will not generate syntax error. ---------------------------------------------------------------------- Ask · 2013-01-04 11:38 QuoteThe default values for C and D are gone, and these parameters are not considered optional any more. Can I prevent this editor behaviour by forcing it to put default values in implementation section when using Alt + Shift + C at first place. Is there any configuration that can be done in Lazarus editor?AFAIK there is no such option, but I agree it would be good to have. I suggest you to enter your feature request into bugtracker. ---------------------------------------------------------------------- motaz · 2013-01-04 12:39 I have tried to compare it with Delphi, and I have Turbo Delphi 2006 version, but I found that this feature (Updating procedure header from implementation or from interface section). This feature is really useful and important, I spent most of time in development in Source Code editor window. I'll try to request it in bug tracker Thanks ---------------------------------------------------------------------- motaz · 2013-01-04 15:06 I have report it in bug tracker: http://mantis.freepascal.org/view.php?id=23582