X-Git-Url: http://git.chise.org/gitweb/?a=blobdiff_plain;f=lisp%2Fflow-fill.el;h=8a9bea0ca65441f99ee3e52e37f5c94611bfd90e;hb=8d5b94488b8fe507a83eb5475ecaa54afb8a98b8;hp=6150d519cdde0f62f57e7427286267d0a22abc6e;hpb=273688f9685956b07b7dcd470fb73e30f9541744;p=elisp%2Fgnus.git- diff --git a/lisp/flow-fill.el b/lisp/flow-fill.el index 6150d51..8a9bea0 100644 --- a/lisp/flow-fill.el +++ b/lisp/flow-fill.el @@ -38,7 +38,7 @@ ;; Todo: encoding, implement basic `fill-region' (Emacs and XEmacs ;; implementations differ..) -;; History: +;;; History: ;; 2000-02-17 posted on ding mailing list ;; 2000-02-19 use `point-at-{b,e}ol' in XEmacs @@ -53,14 +53,14 @@ (eval-and-compile (defalias 'fill-flowed-point-at-bol - (if (fboundp 'point-at-bol) - 'point-at-bol - 'line-beginning-position)) + (if (fboundp 'point-at-bol) + 'point-at-bol + 'line-beginning-position)) - (defalias 'fill-flowed-point-at-eol - (if (fboundp 'point-at-eol) - 'point-at-eol - 'line-end-position))) + (defalias 'fill-flowed-point-at-eol + (if (fboundp 'point-at-eol) + 'point-at-eol + 'line-end-position))) (defun fill-flowed (&optional buffer) (save-excursion @@ -86,7 +86,8 @@ (save-excursion (unless (eobp) (forward-char 1) - (looking-at (format "^\\(%s\\)\\([^>]\\)" (or quote " ?")))))) + (looking-at (format "^\\(%s\\)\\([^>]\\)" + (or quote " ?")))))) (save-excursion (replace-match (if (string= (match-string 2) " ") "" "\\2"))) @@ -95,7 +96,7 @@ (unless sig (let ((fill-prefix (when quote (concat quote " ")))) (fill-region (fill-flowed-point-at-bol) - (1+ (fill-flowed-point-at-eol)) + (min (1+ (fill-flowed-point-at-eol)) (point-max)) 'left 'nosqueeze)))))))) (provide 'flow-fill)