222 |
changes are made within it. Self-inserting characters only cause |
changes are made within it. Self-inserting characters only cause |
223 |
refilling if they would cause auto-filling." |
refilling if they would cause auto-filling." |
224 |
nil " Refill" '(("\177" . backward-delete-char-untabify)) |
nil " Refill" '(("\177" . backward-delete-char-untabify)) |
225 |
;; This provides the test for recursive paragraph filling. |
;; Remove old state if necessary |
226 |
(make-local-variable 'fill-paragraph-function) |
(when refill-ignorable-overlay |
227 |
|
(delete-overlay refill-ignorable-overlay) |
228 |
|
(kill-local-variable 'refill-ignorable-overlay)) |
229 |
|
(when refill-late-fill-paragraph-function |
230 |
|
(setq fill-paragraph-function refill-late-fill-paragraph-function) |
231 |
|
(kill-local-variable 'refill-late-fill-paragraph-function)) |
232 |
(if refill-mode |
(if refill-mode |
233 |
(progn |
(progn |
234 |
(add-hook 'after-change-functions 'refill-after-change-function nil t) |
(add-hook 'after-change-functions 'refill-after-change-function nil t) |
236 |
(add-hook 'pre-command-hook 'refill-pre-command-function nil t) |
(add-hook 'pre-command-hook 'refill-pre-command-function nil t) |
237 |
(set (make-local-variable 'refill-late-fill-paragraph-function) |
(set (make-local-variable 'refill-late-fill-paragraph-function) |
238 |
fill-paragraph-function) |
fill-paragraph-function) |
239 |
|
;; This provides the test for recursive paragraph filling. |
240 |
(set (make-local-variable 'fill-paragraph-function) |
(set (make-local-variable 'fill-paragraph-function) |
241 |
'refill-fill-paragraph) |
'refill-fill-paragraph) |
242 |
;; When using justification, doing DEL on 2 spaces should remove |
;; When using justification, doing DEL on 2 spaces should remove |
251 |
(auto-fill-mode 0)) |
(auto-fill-mode 0)) |
252 |
(remove-hook 'after-change-functions 'refill-after-change-function t) |
(remove-hook 'after-change-functions 'refill-after-change-function t) |
253 |
(remove-hook 'post-command-hook 'refill-post-command-function t) |
(remove-hook 'post-command-hook 'refill-post-command-function t) |
|
(delete-overlay refill-ignorable-overlay) |
|
|
(setq fill-paragraph-function refill-late-fill-paragraph-function) |
|
254 |
(kill-local-variable 'backward-delete-char-untabify-method))) |
(kill-local-variable 'backward-delete-char-untabify-method))) |
255 |
|
|
256 |
(provide 'refill) |
(provide 'refill) |