diff options
| author | Richard M. Stallman | 1998-05-23 20:00:18 +0000 |
|---|---|---|
| committer | Richard M. Stallman | 1998-05-23 20:00:18 +0000 |
| commit | 78652ce8bdcab6b19cc068ebf5d12381c56c5777 (patch) | |
| tree | 52515f5c7efc26d0ff79e8b47e15f6a94e229adb | |
| parent | 2f4027021ecd6073281138fc4c04b361c1a4c14e (diff) | |
| download | emacs-78652ce8bdcab6b19cc068ebf5d12381c56c5777.tar.gz emacs-78652ce8bdcab6b19cc068ebf5d12381c56c5777.zip | |
(fill-region-as-paragraph):
Don't add a newline at the end, when there is none.
| -rw-r--r-- | lisp/textmodes/fill.el | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/lisp/textmodes/fill.el b/lisp/textmodes/fill.el index 9a96711ba76..3bafa4a82d6 100644 --- a/lisp/textmodes/fill.el +++ b/lisp/textmodes/fill.el | |||
| @@ -302,11 +302,10 @@ space does not end a sentence, so don't break a line there." | |||
| 302 | (backward-char 1) | 302 | (backward-char 1) |
| 303 | (setq oneleft t))) | 303 | (setq oneleft t))) |
| 304 | (setq to (point)) | 304 | (setq to (point)) |
| 305 | 305 | ;;; ;; If there was no newline, and there is text in the paragraph, then | |
| 306 | ;; If there was no newline, and there is text in the paragraph, then | 306 | ;;; ;; create a newline. |
| 307 | ;; create a newline. | 307 | ;;; (if (and (not oneleft) (> to from-plus-indent)) |
| 308 | (if (and (not oneleft) (> to from-plus-indent)) | 308 | ;;; (newline)) |
| 309 | (newline)) | ||
| 310 | (goto-char from-plus-indent)) | 309 | (goto-char from-plus-indent)) |
| 311 | 310 | ||
| 312 | (if (not (> to (point))) | 311 | (if (not (> to (point))) |
| @@ -557,7 +556,8 @@ space does not end a sentence, so don't break a line there." | |||
| 557 | (forward-line 1)))))) | 556 | (forward-line 1)))))) |
| 558 | ;; Leave point after final newline. | 557 | ;; Leave point after final newline. |
| 559 | (goto-char (point-max))) | 558 | (goto-char (point-max))) |
| 560 | (forward-char 1)))) | 559 | (unless (eobp) |
| 560 | (forward-char 1))))) | ||
| 561 | 561 | ||
| 562 | (defun fill-paragraph (arg) | 562 | (defun fill-paragraph (arg) |
| 563 | "Fill paragraph at or after point. Prefix arg means justify as well. | 563 | "Fill paragraph at or after point. Prefix arg means justify as well. |