From: Richard M. Stallman Date: Wed, 6 Jul 1994 20:12:42 +0000 (+0000) Subject: (outline-next-preface): Undo previous change: do stop before final newline. X-Git-Tag: emacs-19.34~7700 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=f4136d9c7842bbcc52b4d2e78dd81d9b61984622;p=emacs.git (outline-next-preface): Undo previous change: do stop before final newline. --- diff --git a/lisp/textmodes/ooutline.el b/lisp/textmodes/ooutline.el index 0c60cfe30bd..372ac1418d8 100644 --- a/lisp/textmodes/ooutline.el +++ b/lisp/textmodes/ooutline.el @@ -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."