Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!tut.cis.ohio-state.edu!cheops.cis.ohio-state.edu!karl From: karl@cheops.cis.ohio-state.edu (Karl Kleinpaste) Newsgroups: gnu.emacs.bug Subject: Filling error Message-ID: Date: 13 Nov 89 20:00:52 GMT Sender: news@tut.cis.ohio-state.edu Organization: Ohio State Computer Science Lines: 72 A bug report issued against our Emacs installation commented: | The emacs function fill-paragraph does not work properly. In standard | written English, a colon ':' should be followed by two spaces. | Fill-paragraph deletes a second space if it is there. The following diff makes the appropriate modification, by adding `:' to the list of sentence terminators. *** fill.el~ Thu Aug 18 22:37:55 1988 --- fill.el Mon Nov 13 14:51:56 1989 *************** *** 66,72 **** ;; Make sure sentences ending at end of line get an extra space. (goto-char from) ! (while (re-search-forward "[.?!][])""']*$" nil t) (insert ? )) ;; The change all newlines to spaces. (subst-char-in-region from (point-max) ?\n ?\ ) --- 66,72 ---- ;; Make sure sentences ending at end of line get an extra space. (goto-char from) ! (while (re-search-forward "[.?!:][])""']*$" nil t) (insert ? )) ;; The change all newlines to spaces. (subst-char-in-region from (point-max) ?\n ?\ ) *************** *** 78,84 **** (+ (match-beginning 0) (if (save-excursion (skip-chars-backward " ])\"'") ! (memq (preceding-char) '(?. ?? ?!))) 2 1)) (match-end 0))) (goto-char (point-max)) --- 78,84 ---- (+ (match-beginning 0) (if (save-excursion (skip-chars-backward " ])\"'") ! (memq (preceding-char) '(?. ?? ?! ?:))) 2 1)) (match-end 0))) (goto-char (point-max)) *************** *** 152,162 **** (+ (match-beginning 0) (if (save-excursion (skip-chars-backward " ])\"'") ! (memq (preceding-char) '(?. ?? ?!))) 2 1)) (match-end 0))) (goto-char beg) ! (while (re-search-forward "[.?!][])""']*\n" nil t) (forward-char -1) (insert ? )) (goto-char (point-max)) --- 152,162 ---- (+ (match-beginning 0) (if (save-excursion (skip-chars-backward " ])\"'") ! (memq (preceding-char) '(?. ?? ?! ?:))) 2 1)) (match-end 0))) (goto-char beg) ! (while (re-search-forward "[.?!:][])""']*\n" nil t) (forward-char -1) (insert ? )) (goto-char (point-max)) --Karl