Fix auto-filling regression

Bug#28003
* lisp/newcomment.el (comment-indent-new-line): Check
comment-auto-fill-only-comments.  Reverts earlier change.
* lisp/simple.el (internal-auto-fill): Call auto-fill-function, not
do-auto-fill.
This commit is contained in:
Tom Tromey 2017-08-09 16:06:23 -06:00
parent 904be8c4cf
commit 81656add81
2 changed files with 4 additions and 3 deletions

View file

@ -1382,9 +1382,10 @@ unless optional argument SOFT is non-nil."
(interactive)
(comment-normalize-vars t)
(let (compos comin)
;; If we are not inside a comment don't do anything (unless no
;; comment syntax is defined).
;; If we are not inside a comment and we only auto-fill comments,
;; don't do anything (unless no comment syntax is defined).
(unless (and comment-start
comment-auto-fill-only-comments
(not (called-interactively-p 'interactive))
(not (save-excursion
(prog1 (setq compos (comment-beginning))

View file

@ -7243,7 +7243,7 @@ unless optional argument SOFT is non-nil."
(when (or (not comment-start)
(not comment-auto-fill-only-comments)
(nth 4 (syntax-ppss)))
(do-auto-fill)))
(funcall auto-fill-function)))
(defvar normal-auto-fill-function 'do-auto-fill
"The function to use for `auto-fill-function' if Auto Fill mode is turned on.