Function: outline-revert-buffer-restore-visibility

outline-revert-buffer-restore-visibility is a byte-compiled function defined in outline.el.gz.

Signature

(outline-revert-buffer-restore-visibility)

Documentation

Preserve visibility when reverting buffer under outline-minor-mode(var)/outline-minor-mode(fun).

This function restores the visibility of outlines after the buffer under outline-minor-mode(var)/outline-minor-mode(fun) is reverted by revert-buffer.

Source Code

;; Defined in /usr/src/emacs/lisp/outline.el.gz
(defun outline-revert-buffer-restore-visibility ()
  "Preserve visibility when reverting buffer under `outline-minor-mode'.
This function restores the visibility of outlines after the buffer
under `outline-minor-mode' is reverted by `revert-buffer'."
  (let ((paths (outline--hidden-headings-paths)))
    (unless (and (hash-table-empty-p (nth 0 paths))
                 (null (nth 1 paths)))
      (lambda ()
        (outline--hidden-headings-restore-paths
         (nth 0 paths) (nth 1 paths))))))