mirror of
git://git.sv.gnu.org/emacs.git
synced 2025-12-15 10:30:25 -08:00
(c-fill-paragraph): Preserve final sentence boundary.
This commit is contained in:
parent
ba02c1673c
commit
176afd0492
1 changed files with 5 additions and 1 deletions
|
|
@ -449,12 +449,16 @@ preserving the comment indentation or line-starting decorations."
|
|||
(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)))))
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue