help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Customizing C Indentation


From: Rodrigo González del Cueto
Subject: Re: Customizing C Indentation
Date: Mon, 13 Apr 2015 19:54:05 -0700 (PDT)
User-agent: G2/1.0

On Monday, April 13, 2015 at 5:52:49 PM UTC-5, Rodrigo González del Cueto wrote:
> Hey all,
> 
> I hope you could help me figure out how to customize Emacs to indent code in 
> the following way.
> 
> I'm working on an EDK related project. And the EDK code standards state the 
> following:
> 
> "Subsequent lines of multi-line function calls should line up one or two tab-
> stops from the beginning of the function name."
> 
> Example:
> 
>   Status = gRT->GetVariable(
>                   NORMAL_SETUP_NAME,
>                   &gEfiNormalSetupGuid,
>                   NULL,
>                   &VarSize,
>                   &SystemConfiguration
>                   );
> 
> So given a function call, the arglist-intro offset, should make reference to 
> the position of the first character of the function being called, and from 
> there, go up an indentation level.
> 
> I've read the Emacs documentation, and I only understood how to indent in 
> relation to the previous line's indentation level. But I haven't been able to 
> understand how to move within the previous line's content.
> 
> -Rodrigo

Just realized that the code example format doesn't look the same in every 
computer.
I'll link to the Github source code line, for a better view.

https://github.com/tianocore/edk2/blob/5d6bf9e22973c2ad327ca7422f80144c848912dc/Vlv2TbltDevicePkg/PlatformInfoDxe/PlatformInfoDxe.c#L67


reply via email to

[Prev in Thread] Current Thread [Next in Thread]