Mercurial > emacs
comparison lisp/textmodes/ooutline.el @ 5786:730053369cab
(outline-end-of-subtree): If loop leaves us at eob,
don't move back from there.
author | Richard M. Stallman <rms@gnu.org> |
---|---|
date | Sat, 05 Feb 1994 01:33:12 +0000 |
parents | 5ebe399ed4a3 |
children | c23afcf4e954 |
comparison
equal
deleted
inserted
replaced
5785:e761c2b18894 | 5786:730053369cab |
---|---|
350 (level (funcall outline-level))) | 350 (level (funcall outline-level))) |
351 (while (and (not (eobp)) | 351 (while (and (not (eobp)) |
352 (or first (> (funcall outline-level) level))) | 352 (or first (> (funcall outline-level) level))) |
353 (setq first nil) | 353 (setq first nil) |
354 (outline-next-heading)) | 354 (outline-next-heading)) |
355 (forward-char -1) | 355 (if (eobp) |
356 (if (memq (preceding-char) '(?\n ?\^M)) | 356 nil |
357 (forward-char -1)))) | 357 ;; go to end of line before heading |
358 (forward-char -1) | |
359 ;; skip preceding balnk line, if there is one | |
360 (if (memq (preceding-char) '(?\n ?\^M)) | |
361 (forward-char -1))))) | |
358 | 362 |
359 (defun show-branches () | 363 (defun show-branches () |
360 "Show all subheadings of this heading, but not their bodies." | 364 "Show all subheadings of this heading, but not their bodies." |
361 (interactive) | 365 (interactive) |
362 (show-children 1000)) | 366 (show-children 1000)) |