summaryrefslogtreecommitdiff
path: root/lisp
diff options
context:
space:
mode:
Diffstat (limited to 'lisp')
-rw-r--r--lisp/textmodes/fill.el4
1 files changed, 2 insertions, 2 deletions
diff --git a/lisp/textmodes/fill.el b/lisp/textmodes/fill.el
index 8082dea55ea..6411ba91ea4 100644
--- a/lisp/textmodes/fill.el
+++ b/lisp/textmodes/fill.el
@@ -100,7 +100,7 @@ From program, pass args FROM, TO and JUSTIFY-FLAG."
(goto-char (max from to))
;; If specified region ends before a newline,
;; include that newline.
- (if (and (eolp) (not (eobp)))
+ (if (and (eolp) (not (eobp)) (not (bolp)))
(forward-char 1))
(narrow-to-region (min from to) (point))
(goto-char (point-min))
@@ -264,7 +264,7 @@ space does not end a sentence, so don't break a line there."
(goto-char (max from to))
;; If specified region ends before a newline,
;; include that newline.
- (if (and (eolp) (not (eobp)))
+ (if (and (eolp) (not (eobp)) (not (bolp)))
(forward-char 1))
(narrow-to-region (min from to) (point))
(goto-char (point-min))