Function: c-toggle-auto-newline
c-toggle-auto-newline is an interactive and byte-compiled function
defined in cc-cmds.el.gz.
Signature
(c-toggle-auto-newline &optional ARG)
Documentation
Toggle auto-newline feature.
Optional numeric ARG, if supplied, turns on auto-newline when positive, turns it off when negative, and just toggles it when zero or left out.
Turning on auto-newline automatically enables electric indentation.
When the auto-newline feature is enabled (indicated by "/la" on the mode line after the mode name) newlines are automatically inserted after special characters such as brace, comma, semi-colon, and colon.
Probably introduced at or before Emacs version 22.1.
Key Bindings
Aliases
c-toggle-auto-state (obsolete since 22.1)
Source Code
;; Defined in /usr/src/emacs/lisp/progmodes/cc-cmds.el.gz
(defun c-toggle-auto-newline (&optional arg)
"Toggle auto-newline feature.
Optional numeric ARG, if supplied, turns on auto-newline when
positive, turns it off when negative, and just toggles it when zero or
left out.
Turning on auto-newline automatically enables electric indentation.
When the auto-newline feature is enabled (indicated by \"/la\" on the
mode line after the mode name) newlines are automatically inserted
after special characters such as brace, comma, semi-colon, and colon."
(interactive "P")
(setq c-auto-newline
(c-calculate-state arg (and c-auto-newline c-electric-flag)))
(if c-auto-newline (setq c-electric-flag t))
(c-update-modeline)
(c-keep-region-active))