]> git.eshelyaron.com Git - emacs.git/commitdiff
Clarify docs on newline and auto-fill-mode
authorBasil L. Contovounesios <contovob@tcd.ie>
Wed, 17 Jul 2019 12:05:42 +0000 (13:05 +0100)
committerBasil L. Contovounesios <contovob@tcd.ie>
Mon, 7 Oct 2019 23:10:19 +0000 (00:10 +0100)
* doc/lispref/text.texi (Commands for Insertion):
* lisp/simple.el (newline): Do not mention conditions specific to
'do-auto-fill' under documentation of 'newline' (bug#36702).

doc/lispref/text.texi
lisp/simple.el

index 8d78a9b24ffabf2fba1cb2ec47d8b2be00fb48fc..ef1d8ebc571c947a639a896d33b168e8a98ac404 100644 (file)
@@ -545,25 +545,28 @@ Do not try substituting your own definition of
 loop handles this function specially.
 @end deffn
 
-@deffn Command newline &optional number-of-newlines
+@deffn Command newline &optional number-of-newlines interactive
 This command inserts newlines into the current buffer before point.
 If @var{number-of-newlines} is supplied, that many newline characters
-are inserted.
+are inserted.  In an interactive call, @var{number-of-newlines} is the
+numeric prefix argument.
 
 @cindex newline and Auto Fill mode
-This function calls @code{auto-fill-function} if the current column
-number is greater than the value of @code{fill-column} and
-@var{number-of-newlines} is @code{nil}.  Typically what
+This command calls @code{self-insert-command} to insert newlines,
+which may subsequently break the preceding line by calling
+@code{auto-fill-function} (@pxref{Auto Filling}).  Typically what
 @code{auto-fill-function} does is insert a newline; thus, the overall
 result in this case is to insert two newlines at different places: one
 at point, and another earlier in the line.  @code{newline} does not
 auto-fill if @var{number-of-newlines} is non-@code{nil}.
 
+This command does not run the hook @code{post-self-insert-hook} unless
+called interactively or @var{interactive} is non-@code{nil}.
+
 This command indents to the left margin if that is not zero.
 @xref{Margins}.
 
-The value returned is @code{nil}.  In an interactive call, @var{count}
-is the numeric prefix argument.
+The value returned is @code{nil}.
 @end deffn
 
 @defvar overwrite-mode
index ecd7eb797e84132c7f33d76ceff9566fcf2f6004..b5205dd76483179d1fdc301d9401852b61b9f511 100644 (file)
@@ -500,17 +500,18 @@ If `electric-indent-mode' is enabled, this indents the final new line
 that it adds, and reindents the preceding line.  To just insert
 a newline, use \\[electric-indent-just-newline].
 
-Calls `auto-fill-function' if the current column number is greater
-than the value of `fill-column' and ARG is nil.
+If `auto-fill-mode' is enabled, this may cause automatic line
+breaking of the preceding line.  A non-nil ARG inhibits this.
+
 A non-nil INTERACTIVE argument means to run the `post-self-insert-hook'."
   (interactive "*P\np")
   (barf-if-buffer-read-only)
-  ;; Call self-insert so that auto-fill, abbrev expansion etc. happens.
+  ;; Call self-insert so that auto-fill, abbrev expansion etc. happen.
   ;; Set last-command-event to tell self-insert what to insert.
   (let* ((was-page-start (and (bolp) (looking-at page-delimiter)))
          (beforepos (point))
          (last-command-event ?\n)
-         ;; Don't auto-fill if we have a numeric argument.
+         ;; Don't auto-fill if we have a prefix argument.
          (auto-fill-function (if arg nil auto-fill-function))
          (arg (prefix-numeric-value arg))
          (postproc