Function: c-lineup-arglist-close-under-paren

c-lineup-arglist-close-under-paren is a byte-compiled function defined in cc-align.el.gz.

Signature

(c-lineup-arglist-close-under-paren LANGELEM)

Documentation

Line up a line under the enclosing open paren.

Normally used to line up a closing paren in the same column as its corresponding open paren, but can also be used with arglist-cont and arglist-cont-nonempty to line up all lines inside a parenthesis under the open paren.

As a special case, if a brace block construct starts at the same line as the open parenthesis of the argument list, the indentation is c-basic-offset only. See c-lineup-arglist for further discussion of this "DWIM" measure.

Works with: Almost all symbols, but are typically most useful on arglist-close, brace-list-close, arglist-cont and arglist-cont-nonempty.

Source Code

;; Defined in /usr/src/emacs/lisp/progmodes/cc-align.el.gz
(defun c-lineup-arglist-close-under-paren (langelem)
  "Line up a line under the enclosing open paren.
Normally used to line up a closing paren in the same column as its
corresponding open paren, but can also be used with arglist-cont and
arglist-cont-nonempty to line up all lines inside a parenthesis under
the open paren.

As a special case, if a brace block construct starts at the same line
as the open parenthesis of the argument list, the indentation is
`c-basic-offset' only.  See `c-lineup-arglist' for further discussion
of this \"DWIM\" measure.

Works with: Almost all symbols, but are typically most useful on
arglist-close, brace-list-close, arglist-cont and arglist-cont-nonempty."
  (save-excursion
    (if (memq (c-langelem-sym langelem)
	      '(arglist-cont-nonempty arglist-close))
	(goto-char (c-langelem-2nd-pos c-syntactic-element))
      (beginning-of-line)
      (c-go-up-list-backward))

    (if (save-excursion (c-block-in-arglist-dwim (point)))
	c-basic-offset			; DWIM case.

      ;; Normal case.  Indent to the arglist open paren.
      (let (special-list)
	(if (and c-special-brace-lists
		 (setq special-list (c-looking-at-special-brace-list)))
	    ;; Cope if we're in the middle of a special brace list
	    ;; opener like "({".
	    (goto-char (car (car special-list))))
	(vector (current-column))))))