Function: c-lineup-ObjC-method-call
c-lineup-ObjC-method-call is a byte-compiled function defined in
cc-align.el.gz.
Signature
(c-lineup-ObjC-method-call LANGELEM)
Documentation
Line up selector args as Emacs Lisp mode does with function args:
Go to the position right after the message receiver, and if you are at
the end of the line, indent the current line c-basic-offset columns
from the opening bracket; otherwise you are looking at the first
character of the first method call argument, so line up the current
line with it.
Works with: objc-method-call-cont.
Source Code
;; Defined in /usr/src/emacs/lisp/progmodes/cc-align.el.gz
(defun c-lineup-ObjC-method-call (langelem)
"Line up selector args as Emacs Lisp mode does with function args:
Go to the position right after the message receiver, and if you are at
the end of the line, indent the current line `c-basic-offset' columns
from the opening bracket; otherwise you are looking at the first
character of the first method call argument, so line up the current
line with it.
Works with: objc-method-call-cont."
(save-excursion
(let* ((extra (save-excursion
(back-to-indentation)
(c-backward-syntactic-ws (c-langelem-pos langelem))
(if (eq (char-before) ?:)
(- c-basic-offset)
0)))
(open-bracket-pos (c-langelem-pos langelem))
(open-bracket-col (progn
(goto-char open-bracket-pos)
(current-column)))
(target-col (progn
(forward-char)
(c-forward-sexp)
(skip-chars-forward " \t")
(if (eolp)
(+ open-bracket-col c-basic-offset)
(current-column))))
)
(- target-col open-bracket-col extra))))