all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* Block as method parameter indentation in objc-mode
@ 2015-05-25 18:02 juha.nieminen
  2015-05-25 18:30 ` Pascal J. Bourguignon
  0 siblings, 1 reply; 7+ messages in thread
From: juha.nieminen @ 2015-05-25 18:02 UTC (permalink / raw)
  To: help-gnu-emacs

Is there an easy way in objc-mode to make a starting { symbol that appears in a method parameter to be indented only one space more than the starting [ of the method call? In other words, I want it to indent like this:

    [someObj someMethodTakingABlock: ^()
     {
         // some code here
     }];

Likewise, if possible, the ^(...) part also ought to be indented like that if it's on its own like. So like:

    [someObj someMethodTakingABlock:
     ^(int someValue, NSString* someString)
     {
         // some code here
     }];

Currently objc-mode indents such blocks waaaay to the right, which is rather impractical.

If there happened to be more parameters after that, they ought to be indented as normal. In other words, overall, like this:

    [someObj someParameter: aValue
                    aBlock: ^()
     {
         // some code
     }
           aThirdParameter: anotherValue];


^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2015-05-29  8:18 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-05-25 18:02 Block as method parameter indentation in objc-mode juha.nieminen
2015-05-25 18:30 ` Pascal J. Bourguignon
2015-05-26  8:25   ` juha.nieminen
2015-05-26 12:43     ` Pascal J. Bourguignon
2015-05-28  7:44       ` Juha Nieminen
2015-05-28 18:26         ` John Mastro
     [not found]         ` <mailman.3855.1432837606.904.help-gnu-emacs@gnu.org>
2015-05-29  8:18           ` Juha Nieminen

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.