]> git.eshelyaron.com Git - emacs.git/commitdiff
(outline-next-preface): Undo previous change: do stop before final newline.
authorRichard M. Stallman <rms@gnu.org>
Wed, 6 Jul 1994 20:12:42 +0000 (20:12 +0000)
committerRichard M. Stallman <rms@gnu.org>
Wed, 6 Jul 1994 20:12:42 +0000 (20:12 +0000)
lisp/textmodes/ooutline.el

index 0c60cfe30bda54921dfa467d67f4700ee5c6aa2f..372ac1418d8090392982e8f5e36a1322fa37ac18 100644 (file)
@@ -237,13 +237,14 @@ the number of characters that `outline-regexp' matches."
     (- (match-end 0) (match-beginning 0))))
 
 (defun outline-next-preface ()
-  "Skip forward to just before the next heading line."
+  "Skip forward to just before the next heading line.
+If there's no following heading line, stop before the newline
+at the end of the buffer."
   (if (re-search-forward (concat "[\n\^M]\\(" outline-regexp "\\)")
                         nil 'move)
-      (progn
-       (goto-char (match-beginning 0))
-       (if (memq (preceding-char) '(?\n ?\^M))
-           (forward-char -1)))))
+      (goto-char (match-beginning 0)))
+  (if (memq (preceding-char) '(?\n ?\^M))
+      (forward-char -1)))
 
 (defun outline-next-heading ()
   "Move to the next (possibly invisible) heading line."