changeset 6190:23e31de31f47

(c-fill-paragraph): Preserve final sentence boundary.
author Karl Heuer <kwzh@gnu.org>
date Fri, 04 Mar 1994 00:05:15 +0000
parents 4ff931c18e4b
children 84fc456177e2
files lisp/progmodes/c-mode.el
diffstat 1 files changed, 5 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/progmodes/c-mode.el	Thu Mar 03 23:57:27 1994 +0000
+++ b/lisp/progmodes/c-mode.el	Fri Mar 04 00:05:15 1994 +0000
@@ -449,12 +449,16 @@
 		    (delete-region (point) (+ (point) chars-to-delete)))
 		;; Find the comment ender (should be on last line of buffer,
 		;; given the narrowing) and don't leave it on its own line.
+		;; Do this with a fill command, so as to preserve sentence
+		;; boundaries.
 		(goto-char (point-max))
 		(forward-line -1)
 		(search-forward "*/" nil 'move)
 		(beginning-of-line)
 		(if (looking-at "[ \t]*\\*/")
-		    (delete-indentation)))))
+		    (let ((fill-column (+ fill-column 9999)))
+		      (forward-line -1)
+		      (fill-region-as-paragraph (point) (point-max)))))))
 	;; Outside of comments: do ordinary filling.
 	(fill-paragraph arg)))))