[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#36702: 27.0.50; newline: don't auto-fill regardless of auto-fill-mod

From: Basil L. Contovounesios
Subject: bug#36702: 27.0.50; newline: don't auto-fill regardless of auto-fill-mode
Date: Wed, 17 Jul 2019 11:47:02 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux)

Andreas Röhler <address@hidden> 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

> 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.

The docstring of auto-fill-function says:

  It is called after self-inserting any character specified in
  the `auto-fill-chars' table.

The docstring of self-insert-command says:

  After insertion, `internal-auto-fill' is called if
  `auto-fill-function' is non-nil and if the `auto-fill-chars' table has
  a non-nil value for the inserted character.

So I don't see a bug here.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]