aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRichard M. Stallman2007-01-28 07:13:10 +0000
committerRichard M. Stallman2007-01-28 07:13:10 +0000
commitbbc02d0063f2eb4f291449ef2e0449efea2ce6fd (patch)
treecb81dd7aea18114b67801a1acd92d76c37484444
parentf61eed1d1a4d5dd089813d5e0323c8259791a68e (diff)
downloademacs-bbc02d0063f2eb4f291449ef2e0449efea2ce6fd.tar.gz
emacs-bbc02d0063f2eb4f291449ef2e0449efea2ce6fd.zip
(fill-paragraph-function): Doc fix.
(fill-paragraph): Bind fill-paragraph-function to t to avoid recursion.
-rw-r--r--lisp/textmodes/fill.el8
1 files changed, 5 insertions, 3 deletions
diff --git a/lisp/textmodes/fill.el b/lisp/textmodes/fill.el
index bd157316b4f..7318a52d8a9 100644
--- a/lisp/textmodes/fill.el
+++ b/lisp/textmodes/fill.el
@@ -52,7 +52,8 @@ A value of nil means that any change in indentation starts a new paragraph."
52 52
53(defvar fill-paragraph-function nil 53(defvar fill-paragraph-function nil
54 "Mode-specific function to fill a paragraph, or nil if there is none. 54 "Mode-specific function to fill a paragraph, or nil if there is none.
55If the function returns nil, then `fill-paragraph' does its normal work.") 55If the function returns nil, then `fill-paragraph' does its normal work.
56A value of t means explicitly \"do nothing special\".")
56 57
57(defvar fill-paragraph-handle-comment t 58(defvar fill-paragraph-handle-comment t
58 "Non-nil means paragraph filling will try to pay attention to comments.") 59 "Non-nil means paragraph filling will try to pay attention to comments.")
@@ -761,7 +762,8 @@ If `fill-paragraph-function' is nil, return the `fill-prefix' used for filling."
761 (barf-if-buffer-read-only) 762 (barf-if-buffer-read-only)
762 (list (if current-prefix-arg 'full)))) 763 (list (if current-prefix-arg 'full))))
763 ;; First try fill-paragraph-function. 764 ;; First try fill-paragraph-function.
764 (or (and (or fill-paragraph-function 765 (or (and (not (eq fill-paragraph-function t))
766 (or fill-paragraph-function
765 (and (minibufferp (current-buffer)) 767 (and (minibufferp (current-buffer))
766 (= 1 (point-min)))) 768 (= 1 (point-min))))
767 (let ((function (or fill-paragraph-function 769 (let ((function (or fill-paragraph-function
@@ -773,7 +775,7 @@ If `fill-paragraph-function' is nil, return the `fill-prefix' used for filling."
773 ;; fill-paragraph-handle-comment back to t explicitly or 775 ;; fill-paragraph-handle-comment back to t explicitly or
774 ;; return nil. 776 ;; return nil.
775 (fill-paragraph-handle-comment nil) 777 (fill-paragraph-handle-comment nil)
776 fill-paragraph-function) 778 (fill-paragraph-function t))
777 (funcall function arg))) 779 (funcall function arg)))
778 ;; Then try our syntax-aware filling code. 780 ;; Then try our syntax-aware filling code.
779 (and fill-paragraph-handle-comment 781 (and fill-paragraph-handle-comment