Function: auto-fill-mode
auto-fill-mode is an interactive and byte-compiled function defined in
simple.el.gz.
Signature
(auto-fill-mode &optional ARG)
Documentation
Toggle automatic line breaking (Auto Fill mode).
When Auto Fill mode is enabled, inserting a space at a column
beyond current-fill-column automatically breaks the line at a
previous space.
When auto-fill-mode is on, the auto-fill-function(var)/auto-fill-function(fun) variable is
non-nil.
The value of normal-auto-fill-function specifies the function to use
for auto-fill-function(var)/auto-fill-function(fun) when turning Auto Fill mode on.
This is a minor mode. If called interactively, toggle the Auto-Fill
mode mode. If the prefix argument is positive, enable the mode, and if
it is zero or negative, disable the mode.
If called from Lisp, toggle the mode if ARG is toggle. Enable the
mode if ARG is nil, omitted, or is a positive number. Disable the mode
if ARG is a negative number.
To check whether the minor mode is enabled in the current buffer,
evaluate the variable auto-fill-function(var)/auto-fill-function(fun).
The mode's hook is called both when the mode is enabled and when it is disabled.
Probably introduced at or before Emacs version 19.29.
Key Bindings
Aliases
idlwave-auto-fill-mode (obsolete since 28.1)
fortran-auto-fill-mode (obsolete since 29.1)
Source Code
;; Defined in /usr/src/emacs/lisp/simple.el.gz
(define-minor-mode auto-fill-mode
"Toggle automatic line breaking (Auto Fill mode).
When Auto Fill mode is enabled, inserting a space at a column
beyond `current-fill-column' automatically breaks the line at a
previous space.
When `auto-fill-mode' is on, the `auto-fill-function' variable is
non-nil.
The value of `normal-auto-fill-function' specifies the function to use
for `auto-fill-function' when turning Auto Fill mode on."
:variable (auto-fill-function
. (lambda (v) (setq auto-fill-function
(if v normal-auto-fill-function)))))