[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Block as method parameter indentation in objc-mode
From: |
Juha Nieminen |
Subject: |
Re: Block as method parameter indentation in objc-mode |
Date: |
Fri, 29 May 2015 08:18:52 +0000 (UTC) |
User-agent: |
tin/2.1.1-20120623 ("Mulindry") (UNIX) (Linux/3.2.65-grbfs-kapsi (x86_64)) |
John Mastro <john.b.mastro@gmail.com> wrote:
> Try this:
>
> (eval-after-load 'cc-mode
> '(push '(objc-method-call-cont . (c-lineup-ObjC-method-call-colons
> ;; c-lineup-ObjC-method-call
> 2))
> c-offsets-alist))
>
> That wraps Pascal's suggestion in `eval-after-load' such that it's not
> evaluated until after `cc-mode' is loaded.
That seems to work. Thanks.
As he said, if there's any additional parameter after the {} block,
emacs will consider it a label rather than a paraneter, and mis-indent
(and mis-color) it. Fortunately it's very are for methods to be designed
like this. I suppose I'll cope (unless someone can suggest a fix to that.)
--- news://freenews.netfront.net/ - complaints: news@netfront.net ---