summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRichard M. Stallman <rms@gnu.org>1999-09-08 07:50:19 +0000
committerRichard M. Stallman <rms@gnu.org>1999-09-08 07:50:19 +0000
commitea9ae18a5585a0e2900deab527d29ed9676635f3 (patch)
tree0241414b46de031f2787d3bf7cd374b4f8c9fb59
parentb89d72a18a7211ffb0ffd25c2b423dd553f4cc5f (diff)
downloademacs-ea9ae18a5585a0e2900deab527d29ed9676635f3.tar.gz
(fill-region-as-paragraph, canonically-space-region):
Respect colon-double-space at end of line.
-rw-r--r--lisp/textmodes/fill.el16
1 files changed, 11 insertions, 5 deletions
diff --git a/lisp/textmodes/fill.el b/lisp/textmodes/fill.el
index 129fd42986a..b622d55e092 100644
--- a/lisp/textmodes/fill.el
+++ b/lisp/textmodes/fill.el
@@ -175,12 +175,15 @@ Remove indentation from each line."
;; Make sure sentences ending at end of line get an extra space.
;; loses on split abbrevs ("Mr.\nSmith")
(goto-char beg)
- (while (and (< (point) end)
- (re-search-forward "[.?!][])}\"']*$" end t))
+ (let ((eol-double-space-re (if colon-double-space
+ "[.?!:][])}\"']*$"
+ "[.?!][])}\"']*$")))
+ (while (and (< (point) end)
+ (re-search-forward eol-double-space-re end t))
;; We insert before markers in case a caller such as
;; do-auto-fill has done a save-excursion with point at the end
;; of the line and wants it to stay at the end of the line.
- (insert-before-markers-and-inherit ? ))))
+ (insert-before-markers-and-inherit ? )))))
(defun fill-context-prefix (from to &optional first-line-regexp)
"Compute a fill prefix from the text between FROM and TO.
@@ -422,8 +425,11 @@ space does not end a sentence, so don't break a line there."
;; Make sure sentences ending at end of line get an extra space.
;; loses on split abbrevs ("Mr.\nSmith")
- (while (re-search-forward "[.?!][])}\"']*$" nil t)
- (or (eobp) (insert-and-inherit ?\ )))
+ (let ((eol-double-space-re (if colon-double-space
+ "[.?!:][])}\"']*$"
+ "[.?!][])}\"']*$")))
+ (while (re-search-forward eol-double-space-re nil t)
+ (or (eobp) (insert-and-inherit ?\ ))))
(goto-char from)
(if enable-multibyte-characters