Function: c-lineup-ObjC-method-args-2
c-lineup-ObjC-method-args-2 is a byte-compiled function defined in
cc-align.el.gz.
Signature
(c-lineup-ObjC-method-args-2 LANGELEM)
Documentation
Line up the colons that separate args in a method declaration.
The colon on the current line is aligned with the one on the previous line.
Works with: objc-method-args-cont.
Source Code
;; Defined in /usr/src/emacs/lisp/progmodes/cc-align.el.gz
(defun c-lineup-ObjC-method-args-2 (langelem)
"Line up the colons that separate args in a method declaration.
The colon on the current line is aligned with the one on the previous
line.
Works with: objc-method-args-cont."
(save-excursion
(let* ((here (c-point 'boi))
(curcol (progn (goto-char here) (current-column)))
(eol (c-point 'eol))
(relpos (c-langelem-pos langelem))
(prev-col-column (progn
(skip-chars-backward "^:" relpos)
(and (eq (char-before) ?:)
(- (current-column) 1)))))
(if (not prev-col-column)
c-basic-offset
(goto-char here)
(skip-chars-forward "^:" eol)
(if (eq (char-after) ?:)
(+ curcol (- prev-col-column (current-column)))
c-basic-offset)))))