# HG changeset patch # User Karl Heuer # Date 762739515 0 # Node ID 23e31de31f47ddb98add470cc089271071f5c754 # Parent 4ff931c18e4b7ddabcad9f9607256ee90b8783cc (c-fill-paragraph): Preserve final sentence boundary. diff -r 4ff931c18e4b -r 23e31de31f47 lisp/progmodes/c-mode.el --- 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)))))