aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRichard M. Stallman1997-08-05 06:07:24 +0000
committerRichard M. Stallman1997-08-05 06:07:24 +0000
commitb3ac9fa99a571b0d40bf2a9cd0e4efe56fbe9825 (patch)
tree62d92554d200e49123f3fcb571990090916bc2b9
parent31c691c1a1085aebdbb129151690e1229a61d77c (diff)
downloademacs-b3ac9fa99a571b0d40bf2a9cd0e4efe56fbe9825.tar.gz
emacs-b3ac9fa99a571b0d40bf2a9cd0e4efe56fbe9825.zip
(comment-line-break-function): New variable.
(do-auto-fill): Use that variable.
-rw-r--r--lisp/simple.el13
1 files changed, 11 insertions, 2 deletions
diff --git a/lisp/simple.el b/lisp/simple.el
index 4c55b4e9df0..f0fba7da342 100644
--- a/lisp/simple.el
+++ b/lisp/simple.el
@@ -2606,6 +2606,15 @@ Setting this variable automatically makes it local to the current buffer."
2606 regexp) 2606 regexp)
2607 :group 'fill) 2607 :group 'fill)
2608 2608
2609(defvar comment-line-break-function 'indent-new-comment-line
2610 "*Mode-specific function which line breaks and continues a comment.
2611
2612This function is only called during auto-filling of a comment section.
2613The function should take a single optional argument, which is a flag
2614indicating whether it should use soft newlines.
2615
2616Setting this variable automatically makes it local to the current buffer.")
2617
2609;; This function is the auto-fill-function of a buffer 2618;; This function is the auto-fill-function of a buffer
2610;; when Auto-Fill mode is enabled. 2619;; when Auto-Fill mode is enabled.
2611;; It returns t if it really did any work. 2620;; It returns t if it really did any work.
@@ -2705,10 +2714,10 @@ Setting this variable automatically makes it local to the current buffer."
2705 (if (save-excursion 2714 (if (save-excursion
2706 (skip-chars-backward " \t") 2715 (skip-chars-backward " \t")
2707 (= (point) fill-point)) 2716 (= (point) fill-point))
2708 (indent-new-comment-line t) 2717 (funcall comment-line-break-function t)
2709 (save-excursion 2718 (save-excursion
2710 (goto-char fill-point) 2719 (goto-char fill-point)
2711 (indent-new-comment-line t))) 2720 (funcall comment-line-break-function t)))
2712 ;; Now do justification, if required 2721 ;; Now do justification, if required
2713 (if (not (eq justify 'left)) 2722 (if (not (eq justify 'left))
2714 (save-excursion 2723 (save-excursion