Function: c-semi&comma-no-newlines-for-oneline-inliners

c-semi&comma-no-newlines-for-oneline-inliners is a byte-compiled function defined in cc-align.el.gz.

Signature

(c-semi&comma-no-newlines-for-oneline-inliners)

Documentation

Controls newline insertion after semicolons for some one-line methods.

If a comma was inserted, no determination is made. Newlines are suppressed in one-liners, if the line is an in-class inline function. For other semicolon contexts, no determination is made.

Source Code

;; Defined in /usr/src/emacs/lisp/progmodes/cc-align.el.gz
;; Suppresses new lines after semicolons in one-liners methods
(defun c-semi&comma-no-newlines-for-oneline-inliners ()
  "Controls newline insertion after semicolons for some one-line methods.
If a comma was inserted, no determination is made.  Newlines are
suppressed in one-liners, if the line is an in-class inline function.
For other semicolon contexts, no determination is made."
  (let ((syntax (c-guess-basic-syntax))
        (bol (save-excursion
	       (if (c-safe (up-list -1) t)
		   (c-point 'bol)
		 -1))))
    (if (and (eq (c-last-command-char) ?\;)
	     (eq (car (car syntax)) 'inclass)
	     (eq (car (car (cdr syntax))) 'topmost-intro)
	     (= (c-point 'bol) bol))
        'stop
      nil)))