diff options
author | Richard M. Stallman <rms@gnu.org> | 2007-01-28 07:13:10 +0000 |
---|---|---|
committer | Richard M. Stallman <rms@gnu.org> | 2007-01-28 07:13:10 +0000 |
commit | bbc02d0063f2eb4f291449ef2e0449efea2ce6fd (patch) | |
tree | cb81dd7aea18114b67801a1acd92d76c37484444 /lisp/textmodes/fill.el | |
parent | f61eed1d1a4d5dd089813d5e0323c8259791a68e (diff) | |
download | emacs-bbc02d0063f2eb4f291449ef2e0449efea2ce6fd.tar.gz emacs-bbc02d0063f2eb4f291449ef2e0449efea2ce6fd.tar.bz2 emacs-bbc02d0063f2eb4f291449ef2e0449efea2ce6fd.zip |
(fill-paragraph-function): Doc fix.
(fill-paragraph): Bind fill-paragraph-function to t to avoid recursion.
Diffstat (limited to 'lisp/textmodes/fill.el')
-rw-r--r-- | lisp/textmodes/fill.el | 8 |
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." (defvar fill-paragraph-function nil "Mode-specific function to fill a paragraph, or nil if there is none. -If the function returns nil, then `fill-paragraph' does its normal work.") +If the function returns nil, then `fill-paragraph' does its normal work. +A value of t means explicitly \"do nothing special\".") (defvar fill-paragraph-handle-comment t "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." (barf-if-buffer-read-only) (list (if current-prefix-arg 'full)))) ;; First try fill-paragraph-function. - (or (and (or fill-paragraph-function + (or (and (not (eq fill-paragraph-function t)) + (or fill-paragraph-function (and (minibufferp (current-buffer)) (= 1 (point-min)))) (let ((function (or fill-paragraph-function @@ -773,7 +775,7 @@ If `fill-paragraph-function' is nil, return the `fill-prefix' used for filling." ;; fill-paragraph-handle-comment back to t explicitly or ;; return nil. (fill-paragraph-handle-comment nil) - fill-paragraph-function) + (fill-paragraph-function t)) (funcall function arg))) ;; Then try our syntax-aware filling code. (and fill-paragraph-handle-comment |