Function: c-snug-1line-defun-close

c-snug-1line-defun-close is a byte-compiled function defined in cc-align.el.gz.

Signature

(c-snug-1line-defun-close SYNTAX POS)

Documentation

Determine the brace hanginess for an AWK defun-close.

If the action/function being closed is a one-liner, keep it so. Otherwise put the closing brace on its own line.

Source Code

;; Defined in /usr/src/emacs/lisp/progmodes/cc-align.el.gz
(defun c-snug-1line-defun-close (_syntax pos)
  "Determine the brace hanginess for an AWK defun-close.
If the action/function being closed is a one-liner, keep it so.  Otherwise put
the closing brace on its own line."
  (save-excursion
    (goto-char pos)
    (if (> (c-point 'bol)
	   (progn (up-list -1) (point)))
	'(before after)
      '(after))))