changeset 8153:d21f64e53295

(outline-next-preface): Undo previous change: do stop before final newline.
author Richard M. Stallman <rms@gnu.org>
date Wed, 06 Jul 1994 20:12:42 +0000
parents eecf5ae5a194
children 64363eaca455
files lisp/textmodes/ooutline.el
diffstat 1 files changed, 6 insertions(+), 5 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/textmodes/ooutline.el	Wed Jul 06 19:45:38 1994 +0000
+++ b/lisp/textmodes/ooutline.el	Wed Jul 06 20:12:42 1994 +0000
@@ -237,13 +237,14 @@
     (- (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."