Function: c-semi&comma-inside-parenlist
c-semi&comma-inside-parenlist is a byte-compiled function defined in
cc-align.el.gz.
Signature
(c-semi&comma-inside-parenlist)
Documentation
Controls newline insertion after semicolons in parenthesis lists.
If a comma was inserted, no determination is made. If a semicolon was inserted inside a parenthesis list, no newline is added otherwise a newline is added. In either case, checking is stopped. This supports exactly the old newline insertion behavior.
Source Code
;; Defined in /usr/src/emacs/lisp/progmodes/cc-align.el.gz
;; Useful for c-hanging-semi&comma-criteria
(defun c-semi&comma-inside-parenlist ()
"Controls newline insertion after semicolons in parenthesis lists.
If a comma was inserted, no determination is made. If a semicolon was
inserted inside a parenthesis list, no newline is added otherwise a
newline is added. In either case, checking is stopped. This supports
exactly the old newline insertion behavior."
;; newline only after semicolon, but only if that semicolon is not
;; inside a parenthesis list (e.g. a for loop statement)
(if (not (eq (c-last-command-char) ?\;))
nil ; continue checking
(if (condition-case nil
(save-excursion
(up-list -1)
(not (eq (char-after) ?\()))
(error t))
t
'stop)))