Function: c-lineup-whitesmith-in-block
c-lineup-whitesmith-in-block is a byte-compiled function defined in
cc-align.el.gz.
Signature
(c-lineup-whitesmith-in-block LANGELEM)
Documentation
Line up lines inside a block in Whitesmith style.
It's done in a way that works both when the opening brace hangs and when it doesn't. E.g.:
something
{ something {
foo; <-> foo; <- c-lineup-whitesmith-in-block
} }
<--> c-basic-offset
In the first case the indentation is kept unchanged, in the
second c-basic-offset is added.
Works with: defun-close, defun-block-intro, inline-close, block-close, brace-list-close, brace-list-intro, enum-close, enum-intro, statement-block-intro, arglist-intro, arglist-cont-nonempty, arglist-close, and all in* symbols, e.g. inclass and inextern-lang.
Source Code
;; Defined in /usr/src/emacs/lisp/progmodes/cc-align.el.gz
(defun c-lineup-whitesmith-in-block (_langelem)
"Line up lines inside a block in Whitesmith style.
It's done in a way that works both when the opening brace hangs and
when it doesn't. E.g.:
something
{ something {
foo; <-> foo; <- c-lineup-whitesmith-in-block
} }
<--> c-basic-offset
In the first case the indentation is kept unchanged, in the
second `c-basic-offset' is added.
Works with: defun-close, defun-block-intro, inline-close, block-close,
brace-list-close, brace-list-intro, enum-close, enum-intro,
statement-block-intro, arglist-intro, arglist-cont-nonempty,
arglist-close, and all in* symbols, e.g. inclass and inextern-lang."
(save-excursion
(beginning-of-line)
(if (and (c-go-up-list-backward)
(= (point) (c-point 'boi)))
nil
c-basic-offset)))