Skip to content

Commit 66c0099

Browse files
committed
* lisp/outline.el: Make revert-related functions internal.
(outline--hidden-headings-paths) (outline--hidden-headings-restore-paths): Rename with the prefix 'outline--' to mark them internal to discourage from relying on their arguments and return values.
1 parent 27f46ba commit 66c0099

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

lisp/outline.el

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1699,7 +1699,7 @@ LEVEL, decides of subtree visibility according to
16991699
(point-min) (point-max)))
17001700
(run-hooks 'outline-view-change-hook))
17011701

1702-
(defun outline-hidden-headings-paths ()
1702+
(defun outline--hidden-headings-paths ()
17031703
"Return a hash with headings of currently hidden outlines.
17041704
Every hash key is a list whose elements compose a complete path
17051705
of headings descending from the top level down to the bottom level.
@@ -1729,10 +1729,10 @@ was located before reverting the buffer."
17291729
(point-min) (point-max))
17301730
(list paths current-path)))
17311731

1732-
(defun outline-hidden-headings-restore-paths (paths current-path)
1732+
(defun outline--hidden-headings-restore-paths (paths current-path)
17331733
"Restore hidden outlines from a hash of hidden headings.
17341734
This is useful after reverting the buffer to restore the outlines
1735-
hidden by `outline-hidden-headings-paths'. Also restore point
1735+
hidden by `outline--hidden-headings-paths'. Also restore point
17361736
on the same outline where point was before reverting the buffer."
17371737
(let (path current-point outline-view-change-hook)
17381738
(outline-map-region
@@ -1753,11 +1753,11 @@ on the same outline where point was before reverting the buffer."
17531753
"Preserve visibility when reverting buffer under `outline-minor-mode'.
17541754
This function restores the visibility of outlines after the buffer
17551755
under `outline-minor-mode' is reverted by `revert-buffer'."
1756-
(let ((paths (outline-hidden-headings-paths)))
1756+
(let ((paths (outline--hidden-headings-paths)))
17571757
(unless (and (hash-table-empty-p (nth 0 paths))
17581758
(null (nth 1 paths)))
17591759
(lambda ()
1760-
(outline-hidden-headings-restore-paths
1760+
(outline--hidden-headings-restore-paths
17611761
(nth 0 paths) (nth 1 paths))))))
17621762

17631763
(defun outline-revert-buffer-rehighlight ()

0 commit comments

Comments
 (0)