Fix `org-show-children' error when called before first heading
* lisp/org.el (org-show-children): Fix `org-show-children' error when called before first heading.
This commit is contained in:
parent
82b496c0e9
commit
270aa438e2
|
@ -6004,8 +6004,9 @@ Prefix arg LEVEL is how many levels below the current level
|
|||
should be shown. Default is enough to cause the following
|
||||
heading to appear."
|
||||
(interactive "p")
|
||||
(unless (org-before-first-heading-p)
|
||||
(save-excursion
|
||||
(org-back-to-heading t)
|
||||
(org-with-limited-levels (org-back-to-heading t))
|
||||
(let* ((current-level (funcall outline-level))
|
||||
(max-level (org-get-valid-level
|
||||
current-level
|
||||
|
@ -6033,7 +6034,7 @@ heading to appear."
|
|||
current-level
|
||||
(max (funcall outline-level) max-level)))
|
||||
(setq past-first-child t))
|
||||
(org-flag-heading nil)))))
|
||||
(org-flag-heading nil))))))
|
||||
|
||||
(defun org-show-subtree ()
|
||||
"Show everything after this heading at deeper levels."
|
||||
|
|
Loading…
Reference in New Issue