lang/org: fix org-shifttab only toggling current fold
This commit is contained in:
parent
ca9957b6d8
commit
b7577f1e26
1 changed files with 11 additions and 10 deletions
|
@ -334,13 +334,14 @@ wrong places)."
|
||||||
"Toggle the local fold at the point (as opposed to cycling through all levels
|
"Toggle the local fold at the point (as opposed to cycling through all levels
|
||||||
with `org-cycle')."
|
with `org-cycle')."
|
||||||
(interactive)
|
(interactive)
|
||||||
(save-excursion
|
(unless (eq this-command 'org-shifttab)
|
||||||
(org-beginning-of-line)
|
(save-excursion
|
||||||
(cond ((org-at-heading-p)
|
(org-beginning-of-line)
|
||||||
(outline-toggle-children)
|
(cond ((org-at-heading-p)
|
||||||
(unless (outline-invisible-p (line-end-position))
|
(outline-toggle-children)
|
||||||
(org-cycle-hide-drawers 'subtree))
|
(unless (outline-invisible-p (line-end-position))
|
||||||
t)
|
(org-cycle-hide-drawers 'subtree))
|
||||||
((org-in-src-block-p)
|
t)
|
||||||
(org-babel-remove-result)
|
((org-in-src-block-p)
|
||||||
t))))
|
(org-babel-remove-result)
|
||||||
|
t)))))
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue