Function: c-lineup-ObjC-method-args

c-lineup-ObjC-method-args is a byte-compiled function defined in cc-align.el.gz.

Signature

(c-lineup-ObjC-method-args 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 first 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 (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 first
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))
	   (first-col-column (progn
			       (goto-char relpos)
			       (skip-chars-forward "^:" eol)
			       (and (eq (char-after) ?:)
				    (current-column)))))
      (if (not first-col-column)
	  c-basic-offset
	(goto-char here)
	(skip-chars-forward "^:" eol)
	(if (eq (char-after) ?:)
	    (+ curcol (- first-col-column (current-column)))
	  c-basic-offset)))))