emacs-devel
[Top][All Lists]
Advanced

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

Re: Missing features in c-ts-mode


From: Ergus
Subject: Re: Missing features in c-ts-mode
Date: Fri, 17 Feb 2023 19:27:07 +0100

On Fri, Feb 17, 2023 at 07:10:28PM +0100, Theodor Thornhill wrote:


On 17 February 2023 19:02:28 CET, Ergus <spacibba@aol.com> wrote:

Yep! Is there any particular style? Would pragmas be indented from the parent 
scope, and the next line after it be at the same level as the pragma?

Theo


Hi:

Yes, pragmas will be generally indented from the parent scope,
continuation lines are usually in the same level or one level more,

And then everything continues as usual:

These are the common use cases I know so far:

// outline pragmas
#pragma bla
int myfunction1()
{...}

int main()
{
    // inline pragmas for functions
    #pragma bla bla
    somefunction1()

    // inline pragmas for function with continuation one level more
    #pragma bla bla\
        the continuation of pragma
    somefunction2()

    // inline pragma for a block of code
    #pragma bla2
    {
        this is a block as usual

        // nested pragma
        #pragma mynestedpragma
        bla()
    }
}

Best and thanks,
Ergus


reply via email to

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