changeset 19160:6fc804ec9434

(comment-line-break-function): New variable. (do-auto-fill): Use that variable.
author Richard M. Stallman <rms@gnu.org>
date Tue, 05 Aug 1997 06:07:24 +0000
parents 4bfebbf0f6a8
children 248ec4d8a5e6
files lisp/simple.el
diffstat 1 files changed, 11 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/simple.el	Tue Aug 05 05:49:10 1997 +0000
+++ b/lisp/simple.el	Tue Aug 05 06:07:24 1997 +0000
@@ -2606,6 +2606,15 @@
 		 regexp)
   :group 'fill)
 
+(defvar comment-line-break-function 'indent-new-comment-line
+  "*Mode-specific function which line breaks and continues a comment.
+
+This function is only called during auto-filling of a comment section.
+The function should take a single optional argument, which is a flag
+indicating whether it should use soft newlines.
+
+Setting this variable automatically makes it local to the current buffer.")
+
 ;; This function is the auto-fill-function of a buffer
 ;; when Auto-Fill mode is enabled.
 ;; It returns t if it really did any work.
@@ -2705,10 +2714,10 @@
 		(if (save-excursion
 		      (skip-chars-backward " \t")
 		      (= (point) fill-point))
-		    (indent-new-comment-line t)
+		    (funcall comment-line-break-function t)
 		  (save-excursion
 		    (goto-char fill-point)
-		    (indent-new-comment-line t)))
+		    (funcall comment-line-break-function t)))
 		;; Now do justification, if required
 		(if (not (eq justify 'left))
 		    (save-excursion