(forward-paragraph): Avoid args-out-of-range error when point winds up
authorLuc Teirlinck <teirllm@auburn.edu>
Wed, 29 Sep 2004 22:23:43 +0000 (22:23 +0000)
committerLuc Teirlinck <teirllm@auburn.edu>
Wed, 29 Sep 2004 22:23:43 +0000 (22:23 +0000)
at the beginning of the buffer and hard newlines are enabled.

lisp/ChangeLog
lisp/textmodes/paragraphs.el

index e443b47..0ed8630 100644 (file)
@@ -1,5 +1,9 @@
 2004-09-29  Luc Teirlinck  <teirllm@auburn.edu>
 
+       * textmodes/paragraphs.el (forward-paragraph): Avoid
+       args-out-of-range error when point winds up at the beginning of
+       the buffer and hard newlines are enabled.
+
        * newcomment.el (comment-multi-line): Doc fix.
 
 2004-09-29  Stefan Monnier  <monnier@iro.umontreal.ca>
index e5f3897..868dcb2 100644 (file)
@@ -274,8 +274,9 @@ Returns the count of paragraphs left to move."
                                   (not (looking-at parsep)))
                            (not (and (looking-at parstart)
                                      (or (not use-hard-newlines)
-                                         (get-text-property (1- start) 'hard)
-                                         (bobp)))))
+                                         (bobp)
+                                         (get-text-property
+                                          (1- start) 'hard)))))
                  (setq found-start nil)
                  (goto-char start))
                found-start)