4

I'm using objc-mode and in general the indentation works quite well, but I am having difficulty with the following code.

dispatch_async(dispatch_get_main_queue(), ^{
    [self someMethod];
});

Emacs tries to indent it like so:

dispatch_async(dispatch_get_main_queue(), ^{
        [self someMethod];
    });

Basically whenever there's a block inside a function / method call, it indents too much. The syntactic analysis for the 1st line of the block is (arglist-cont-nonempty, statement-block-intro). statement-block-intro is set to '+. arglist-cont-nonempty is set to '(c-lineup-gcc-asm-reg c-lineup-arglist). In other words, just the defaults.

What should I do to get it to indent properly?

Austin Taylor
  • 5,437
  • 1
  • 23
  • 29
  • I Don't do objective-c so I don't know if this will mess up other aspects of indentation but setting statement-block-intro to 0 and block-close to '- worked for me – Jordon Biondo Apr 01 '14 at 20:12

0 Answers0