[gnu.emacs.bug] Filling error

karl@cheops.cis.ohio-state.edu (Karl Kleinpaste) (11/14/89)

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