Function: outline-hide-other

outline-hide-other is an interactive and byte-compiled function defined in outline.el.gz.

Signature

(outline-hide-other)

Documentation

Hide everything except current body and parent and top-level headings.

This also unhides the top heading-less body, if any.

View in manual

Key Bindings

Aliases

hide-other (obsolete since 25.1)

Source Code

;; Defined in /usr/src/emacs/lisp/outline.el.gz
(defun outline-hide-other ()
  "Hide everything except current body and parent and top-level headings.
This also unhides the top heading-less body, if any."
  (interactive)
  (outline-hide-sublevels 1)
  (let (outline-view-change-hook)
    (save-excursion
      (outline-back-to-heading t)
      (outline-show-entry)
      (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))
			     nil))))
  (run-hooks 'outline-view-change-hook))