Andreas Röhler <andreas.roehler@easy-emacs.de> writes:
have an auto-fill-function set in a mode.
When testing, noticed that this auto-fill-function was called by `newline`
even if no auto-fill-mode.
Making auto-fill-function non-nil is effectively the same as enabling
auto-fill-mode.
See definition of newline from simple.el, line 22:
(auto-fill-function (if arg nil auto-fill-function))
IMO there is also a docu bug, as this auto-filling is switched of by any arg
whilst docu says: With ARG, insert that many newlines -- which sounds unrelated
if filling.
I don't see a documentation bug, as the behaviour you see is documented
in both docstrings and the Elisp manual.
The docstring of newline says:
Calls `auto-fill-function' if the current column number is greater
than the value of `fill-column' and ARG is nil.