From: Stefan Monnier Date: Mon, 23 Oct 2000 07:35:30 +0000 (+0000) Subject: Fix var names in doc. X-Git-Tag: emacs-pretest-21.0.90~671 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=7850e1884587e678de8851845b9be933c60d66a4;p=emacs.git Fix var names in doc. (refill-mode): Don't bother with make-local-hook anymore. --- diff --git a/lisp/textmodes/refill.el b/lisp/textmodes/refill.el index ae9e41dae78..e130874a240 100644 --- a/lisp/textmodes/refill.el +++ b/lisp/textmodes/refill.el @@ -23,7 +23,7 @@ ;;; Commentary: ;; Provides a mode where paragraphs are refilled after changes in them -;; (using `after-change-hooks'). This gives something akin to typical +;; (using `after-change-functions'). This gives something akin to typical ;; word processor-style filling. We restrict refilling due to ;; self-insertion to the characters which trigger auto-fill. @@ -45,12 +45,12 @@ ;; The work is done in a local post-command hook but only if ;; `refill-doit' has been set by the after-change function. Using -;; `post-command-hooks' ensures simply that refilling only happens +;; `post-command-hook' ensures simply that refilling only happens ;; once per command. ;; [Per Abrahamsen's maniac.el does a similar thing, but operates from ;; post-command-hook. I don't understand the statement in it that -;; after-change-hooks don't work for this purpose; perhaps there was +;; after-change-functions don't work for this purpose; perhaps there was ;; some Emacs bug at the time. ISTR maniac has problems with ;; whitespace at the end of paragraphs.] @@ -74,8 +74,8 @@ (defvar refill-doit nil "Non-nil means that `refill-post-command-function' does its processing. -Set by `refill-after-change-function' in `after-change-hooks' and -unset by `refill-post-command-function' in `post-command-hooks'. This +Set by `refill-after-change-function' in `after-change-functions' and +unset by `refill-post-command-function' in `post-command-hook'. This ensures refilling is only done once per command that causes a change, regardless of the number of after-change calls from commands doing complex processing.") @@ -140,13 +140,12 @@ refilling if they would cause auto-filling." ;; This provides the test for recursive paragraph filling. (make-local-variable 'fill-paragraph-function) (if refill-mode - (progn (add-hook (make-local-hook 'after-change-functions) - 'refill-after-change-function nil t) - (add-hook (make-local-hook 'post-command-hook) - 'refill-post-command-function nil t) - (set (make-local-variable 'fill-paragraph-function) - 'refill-fill-paragraph) - (auto-fill-mode 0)) + (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 '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)))