diff options
author | Karl Heuer <kwzh@gnu.org> | 1994-04-18 23:53:51 +0000 |
---|---|---|
committer | Karl Heuer <kwzh@gnu.org> | 1994-04-18 23:53:51 +0000 |
commit | b7e49b19acf3662068479a69b8951ff89e712928 (patch) | |
tree | 7bba98081c7327c821dafebfe54bbe54c6eebca3 /lisp/textmodes/ooutline.el | |
parent | 213a0343cfa03b0ee380fee8a22e82b23e2b6507 (diff) | |
download | emacs-b7e49b19acf3662068479a69b8951ff89e712928.tar.gz |
(outline-end-of-subtree): Stop before final newline.
Diffstat (limited to 'lisp/textmodes/ooutline.el')
-rw-r--r-- | lisp/textmodes/ooutline.el | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/lisp/textmodes/ooutline.el b/lisp/textmodes/ooutline.el index 17845d8d4d1..7374d4c0bda 100644 --- a/lisp/textmodes/ooutline.el +++ b/lisp/textmodes/ooutline.el @@ -417,13 +417,13 @@ while if FLAG is `\\^M' (control-M) the text is hidden." (or first (> (funcall outline-level) level))) (setq first nil) (outline-next-heading)) - (if (eobp) - nil - ;; go to end of line before heading - (forward-char -1) - ;; skip preceding blank line, if there is one - (if (memq (preceding-char) '(?\n ?\^M)) - (forward-char -1))))) + (if (memq (preceding-char) '(?\n ?\^M)) + (progn + ;; got to end of line before heading + (forward-char -1) + (if (memq (preceding-char) '(?\n ?\^M)) + ;; leave blank line before heading + (forward-char -1)))))) (defun show-branches () "Show all subheadings of this heading, but not their bodies." |