]> git.eshelyaron.com Git - emacs.git/commitdiff
(refill-late-fill-paragraph-function): New
authorDave Love <fx@gnu.org>
Fri, 27 Oct 2000 15:50:24 +0000 (15:50 +0000)
committerDave Love <fx@gnu.org>
Fri, 27 Oct 2000 15:50:24 +0000 (15:50 +0000)
variable.
(refill-mode): Use it.

lisp/textmodes/refill.el

index 78518a9bc963845e58b0c6ff1508132354d45c9a..4e9039c87d4ec0262f30746d7cc907fb61c26c9d 100644 (file)
@@ -119,6 +119,8 @@ complex processing.")
      (t (refill-fill-paragraph nil)))
     (setq refill-doit nil)))
 
+(defvar refill-late-fill-paragraph-function nil)
+
 ;;;###autoload
 (define-minor-mode refill-mode
   "Toggle Refill minor mode.
@@ -134,12 +136,14 @@ refilling if they would cause auto-filling."
       (progn
        (add-hook 'after-change-functions 'refill-after-change-function nil t)
        (add-hook 'post-command-hook 'refill-post-command-function nil t)
+       (set (make-local-variable 'refill-late-fill-paragraph-function)
+            fill-paragraph-function)
        (set (make-local-variable 'fill-paragraph-function)
             'refill-fill-paragraph)
        (auto-fill-mode 0))
     (remove-hook 'after-change-functions 'refill-after-change-function t)
     (remove-hook 'post-command-hook 'refill-post-command-function t)
-    (setq fill-paragraph-function nil)))
+    (setq fill-paragraph-function refill-late-fill-paragraph-function)))
 
 (provide 'refill)