summaryrefslogtreecommitdiff
path: root/lisp
diff options
context:
space:
mode:
authorRichard M. Stallman <rms@gnu.org>1998-08-08 21:31:12 +0000
committerRichard M. Stallman <rms@gnu.org>1998-08-08 21:31:12 +0000
commiteeb0f327362c6b1d12a0b1396e8c183d2ef4792a (patch)
treed92c2a2aa7275c8df199893d2b65f1f92d1abde9 /lisp
parent20cf0008edbf0a0bf1186adaeaf52b471f62e80a (diff)
downloademacs-eeb0f327362c6b1d12a0b1396e8c183d2ef4792a.tar.gz
emacs-eeb0f327362c6b1d12a0b1396e8c183d2ef4792a.tar.bz2
emacs-eeb0f327362c6b1d12a0b1396e8c183d2ef4792a.zip
(forward-paragraph): Fix the logic for handling beginning of buffer
in the "no fill-prefix" case.
Diffstat (limited to 'lisp')
-rw-r--r--lisp/textmodes/paragraphs.el17
1 files changed, 10 insertions, 7 deletions
diff --git a/lisp/textmodes/paragraphs.el b/lisp/textmodes/paragraphs.el
index c0199b435df..d647419d123 100644
--- a/lisp/textmodes/paragraphs.el
+++ b/lisp/textmodes/paragraphs.el
@@ -184,7 +184,7 @@ to which the end of the previous line belongs, or the end of the buffer."
paragraph-separate))
;; This is used for searching.
(sp-paragraph-start (concat "^[ \t]*\\(" paragraph-start "\\)"))
- start)
+ start found-start)
(while (and (< arg 0) (not (bobp)))
(if (and (not (looking-at paragraph-separate))
(re-search-backward "^\n" (max (1- (point)) (point-min)) t)
@@ -223,18 +223,21 @@ to which the end of the previous line belongs, or the end of the buffer."
;;; (forward-line 1))
(not (bobp)))
(while (and (re-search-backward sp-paragraph-start nil 1)
+ (setq found-start t)
;; Found a candidate, but need to check if it is a
;; REAL paragraph-start.
- (not (bobp))
(progn (setq start (point))
(move-to-left-margin)
(not (looking-at paragraph-separate)))
- (or (not (looking-at paragraph-start))
- (and use-hard-newlines
- (not (get-text-property (1- start)
- 'hard)))))
+ (not (and (looking-at paragraph-start)
+ (not
+ (and use-hard-newlines
+ (not (bobp))
+ (not (get-text-property (1- start)
+ 'hard)))))))
+ (setq found-start nil)
(goto-char start))
- (> (point) (point-min)))
+ found-start)
;; Found one.
(progn
;; Move forward over paragraph separators.