summaryrefslogtreecommitdiff
path: root/lisp/newcomment.el
diff options
context:
space:
mode:
authorTom Tromey <tom@tromey.com>2017-08-05 18:30:52 -0600
committerTom Tromey <tom@tromey.com>2017-08-05 18:31:39 -0600
commit9b463fa8648b7baed95a44f4317cb7402fd8bf1c (patch)
treec7134b781617519f14256c5126a766673a01c7dd /lisp/newcomment.el
parent0bd08c00751a9deee66d304d3f18aa45ef1276db (diff)
downloademacs-9b463fa8648b7baed95a44f4317cb7402fd8bf1c.tar.gz
Respect comment-auto-fill-only-comments
Respect comment-auto-fill-only-comments when auto-filling and a comment syntax is defined. * lisp/newcomment.el (comment-indent-new-line): Do not check comment-auto-fill-only-comments. * lisp/simple.el (internal-auto-fill): New defun. * src/cmds.c (internal_self_insert): Call Qinternal_auto_fill, not auto_fill_function. (syms_of_cmds): Define Qinternal_auto_fill.
Diffstat (limited to 'lisp/newcomment.el')
-rw-r--r--lisp/newcomment.el5
1 files changed, 2 insertions, 3 deletions
diff --git a/lisp/newcomment.el b/lisp/newcomment.el
index 8772b52376d..e3ee4dfab11 100644
--- a/lisp/newcomment.el
+++ b/lisp/newcomment.el
@@ -1382,10 +1382,9 @@ unless optional argument SOFT is non-nil."
(interactive)
(comment-normalize-vars t)
(let (compos comin)
- ;; If we are not inside a comment and we only auto-fill comments,
- ;; don't do anything (unless no comment syntax is defined).
+ ;; If we are not inside a comment 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))