Function: c-lineup-inexpr-block
c-lineup-inexpr-block is a byte-compiled function defined in
cc-align.el.gz.
Signature
(c-lineup-inexpr-block LANGELEM)
Documentation
Line up the block for constructs that use a block inside an expression,
e.g. anonymous classes in Java and lambda functions in Pike. The body
is aligned with the start of the header, e.g. with the "new" or
"lambda" keyword. Returns nil if the block isn't part of such a
construct.
Works with: inlambda, inexpr-statement, inexpr-class.
Source Code
;; Defined in /usr/src/emacs/lisp/progmodes/cc-align.el.gz
(defun c-lineup-inexpr-block (_langelem)
"Line up the block for constructs that use a block inside an expression,
e.g. anonymous classes in Java and lambda functions in Pike. The body
is aligned with the start of the header, e.g. with the \"new\" or
\"lambda\" keyword. Returns nil if the block isn't part of such a
construct.
Works with: inlambda, inexpr-statement, inexpr-class."
(save-excursion
(back-to-indentation)
(let* ((paren-state (c-parse-state))
(containing-sexp (c-most-enclosing-brace paren-state))
(res (or (c-looking-at-inexpr-block
(c-safe-position containing-sexp paren-state)
containing-sexp)
(and containing-sexp
(progn (goto-char containing-sexp)
(eq (char-after) ?{))
(progn (setq containing-sexp
(c-most-enclosing-brace paren-state
(point)))
(c-looking-at-inexpr-block
(c-safe-position containing-sexp paren-state)
containing-sexp))))))
(when res
(goto-char (cdr res))
(vector (current-column))))))