Mercurial > emacs
comparison lisp/textmodes/refill.el @ 50410:fff8e0eb547c
(refill-fill-paragraph-at): Don't preserve the trailing space since
fill.el doesn't remove it anymore.
(refill-mode): Reset fill-paragraph-function even if it was nil.
author | Stefan Monnier <monnier@iro.umontreal.ca> |
---|---|
date | Wed, 02 Apr 2003 23:57:17 +0000 |
parents | 5ade352e8d1c |
children | d76c62787135 |
comparison
equal
deleted
inserted
replaced
50409:97b1943f76b5 | 50410:fff8e0eb547c |
---|---|
112 (goto-char pos) | 112 (goto-char pos) |
113 ;; FIXME: forward-paragraph seems to disregard `use-hard-newlines', | 113 ;; FIXME: forward-paragraph seems to disregard `use-hard-newlines', |
114 ;; leading to excessive refilling and wrong choice of fill-prefix. | 114 ;; leading to excessive refilling and wrong choice of fill-prefix. |
115 ;; might be a bug in my paragraphs.el. | 115 ;; might be a bug in my paragraphs.el. |
116 (forward-paragraph) | 116 (forward-paragraph) |
117 (skip-syntax-backward "-") | |
118 (let ((end (point)) | 117 (let ((end (point)) |
119 (beg (progn (backward-paragraph) (point))) | 118 (beg (progn (backward-paragraph) (point))) |
120 (obeg (overlay-start refill-ignorable-overlay)) | 119 (obeg (overlay-start refill-ignorable-overlay)) |
121 (oend (overlay-end refill-ignorable-overlay))) | 120 (oend (overlay-end refill-ignorable-overlay))) |
122 (goto-char pos) | 121 (goto-char pos) |
228 nil " Refill" '(("\177" . backward-delete-char-untabify)) | 227 nil " Refill" '(("\177" . backward-delete-char-untabify)) |
229 ;; Remove old state if necessary | 228 ;; Remove old state if necessary |
230 (when refill-ignorable-overlay | 229 (when refill-ignorable-overlay |
231 (delete-overlay refill-ignorable-overlay) | 230 (delete-overlay refill-ignorable-overlay) |
232 (kill-local-variable 'refill-ignorable-overlay)) | 231 (kill-local-variable 'refill-ignorable-overlay)) |
233 (when refill-late-fill-paragraph-function | 232 (when (local-variable-p 'refill-late-fill-paragraph-function) |
234 (setq fill-paragraph-function refill-late-fill-paragraph-function) | 233 (setq fill-paragraph-function refill-late-fill-paragraph-function) |
235 (kill-local-variable 'refill-late-fill-paragraph-function)) | 234 (kill-local-variable 'refill-late-fill-paragraph-function)) |
236 (if refill-mode | 235 (if refill-mode |
237 (progn | 236 (progn |
238 (add-hook 'after-change-functions 'refill-after-change-function nil t) | 237 (add-hook 'after-change-functions 'refill-after-change-function nil t) |