Commit 81656add authored by Tom Tromey's avatar Tom Tromey
Browse files

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.
parent 904be8c4
......@@ -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))
......
......@@ -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.
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment