Don't add a newline at the end, when there is none.
(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)))
(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.