]> code.delx.au - gnu-emacs/blobdiff - lisp/outline.el
(gdb-flush-pending-output): New variable.
[gnu-emacs] / lisp / outline.el
index 0f7d3b627b05be5e4ec015e6f3f6d52222b93ee9..89e9e193e9cdd81759e22490100772b000eb2a85 100644 (file)
@@ -723,7 +723,7 @@ Show the heading too, if it is currently invisible."
                         (progn (outline-next-preface) (point)) nil)))
 
 (defun hide-body ()
-  "Hide all of buffer except headings."
+  "Hide all body lines in buffer, leaving all headings visible."
   (interactive)
   (hide-region-body (point-min) (point-max)))
 
@@ -738,7 +738,8 @@ Show the heading too, if it is currently invisible."
        (narrow-to-region start end)
        (goto-char (point-min))
        (if (outline-on-heading-p)
-           (outline-end-of-heading))
+           (outline-end-of-heading)
+         (outline-next-preface))
        (while (not (eobp))
          (outline-flag-region (point)
                               (progn (outline-next-preface) (point)) t)
@@ -808,7 +809,7 @@ Show the heading too, if it is currently invisible."
     (save-excursion
       (outline-back-to-heading t)
       (show-entry)
-      (while (condition-case nil (progn (outline-up-heading 1) (not (bobp)))
+      (while (condition-case nil (progn (outline-up-heading 1 t) (not (bobp)))
               (error nil))
        (outline-flag-region (1- (point))
                             (save-excursion (forward-line 1) (point))