[Emacs-ada-mode] Indentation of broken lines in parameter lines

Manuel Gomez mgrojo at gmail.com
Sat Nov 8 11:46:04 PST 2008


Stephen Leake wrote:
> "Manuel Gomez" writes:
>> Shouldn't "Very_Long_Name_Sample_Package.T_Very_Very_Long_Type_Name;"
>> be indented as a broken line in the same way used at the procedure
>> call for "Very_Long_Name_Sample_Package.Very_Very_Long_Constant_Name"?
> 
> Yes, that would be consistent.
> 
> It's even worse if you use ada-format-paramlist; that puts the type
> name back on the same line as the parameter.
> 
>> Is there a customization for this case?
> 
> No.
> 
> The key function here is ada-get-indent-paramlist. It looks like it would
> be easy to add this case. Can you give it a try? I'm pretty busy at
> the moment.
> 

Thanks for the help, Stephen.

You were right, the solution has been simple. I just changed the
indentation from 0 to 'ada-broken-indent for the appropriate case
(inside a parameter declaration), which was already taken into account
in the function. I attach the patch.

The problem with ada-format-paramlist has also been indirectly solved --
I don't know how. But there are other problems around over unusual
layouts, e.g. try setting parameter name, package name and type name
each one on a line: ada-format-paramlist will remove the type name.

Regards
--
Manuel

-------------- next part --------------
A non-text attachment was scrubbed...
Name: broken_param.patch
Type: text/x-diff
Size: 558 bytes
Desc: not available
URL: <http://stephe-leake.org/pipermail/emacs-ada-mode_stephe-leake.org/attachments/20081108/980ddf6e/attachment.bin>


More information about the Emacs-ada-mode mailing list