Mercurial > emacs
changeset 22198:74d1c031f824
(fill-region-as-paragraph):
Don't add a newline at the end, when there is none.
author | Richard M. Stallman <rms@gnu.org> |
---|---|
date | Sat, 23 May 1998 20:00:18 +0000 |
parents | e03f87c938ca |
children | edca9002c740 |
files | lisp/textmodes/fill.el |
diffstat | 1 files changed, 6 insertions(+), 6 deletions(-) [+] |
line wrap: on
line diff
--- a/lisp/textmodes/fill.el Sat May 23 19:59:27 1998 +0000 +++ b/lisp/textmodes/fill.el Sat May 23 20:00:18 1998 +0000 @@ -302,11 +302,10 @@ (backward-char 1) (setq oneleft t))) (setq to (point)) - - ;; If there was no newline, and there is text in the paragraph, then - ;; create a newline. - (if (and (not oneleft) (> to from-plus-indent)) - (newline)) +;;; ;; If there was no newline, and there is text in the paragraph, then +;;; ;; create a newline. +;;; (if (and (not oneleft) (> to from-plus-indent)) +;;; (newline)) (goto-char from-plus-indent)) (if (not (> to (point))) @@ -557,7 +556,8 @@ (forward-line 1)))))) ;; Leave point after final newline. (goto-char (point-max))) - (forward-char 1)))) + (unless (eobp) + (forward-char 1))))) (defun fill-paragraph (arg) "Fill paragraph at or after point. Prefix arg means justify as well.