Refactor `org-global-cycle'
* lisp/org.el (org-global-cycle): Small refactoring. Always assume `org-mode' as major mode. Show all is not necessary.
This commit is contained in:
parent
a9ba5dc2dc
commit
1bf2b33e27
|
@ -6479,18 +6479,15 @@ Use `\\[org-edit-special]' to edit table.el tables"))
|
||||||
With `\\[universal-argument]' prefix ARG, switch to startup visibility.
|
With `\\[universal-argument]' prefix ARG, switch to startup visibility.
|
||||||
With a numeric prefix, show all headlines up to that level."
|
With a numeric prefix, show all headlines up to that level."
|
||||||
(interactive "P")
|
(interactive "P")
|
||||||
(let ((org-cycle-include-plain-lists
|
|
||||||
(if (derived-mode-p 'org-mode) org-cycle-include-plain-lists nil)))
|
|
||||||
(cond
|
(cond
|
||||||
((integerp arg)
|
((integerp arg)
|
||||||
(org-show-all '(headings blocks))
|
(org-content arg)
|
||||||
(outline-hide-sublevels arg)
|
|
||||||
(setq org-cycle-global-status 'contents))
|
(setq org-cycle-global-status 'contents))
|
||||||
((equal arg '(4))
|
((equal arg '(4))
|
||||||
(org-set-startup-visibility)
|
(org-set-startup-visibility)
|
||||||
(org-unlogged-message "Startup visibility, plus VISIBILITY properties."))
|
(org-unlogged-message "Startup visibility, plus VISIBILITY properties."))
|
||||||
(t
|
(t
|
||||||
(org-cycle '(4))))))
|
(org-cycle '(4)))))
|
||||||
|
|
||||||
(defun org-set-startup-visibility ()
|
(defun org-set-startup-visibility ()
|
||||||
"Set the visibility required by startup options and properties."
|
"Set the visibility required by startup options and properties."
|
||||||
|
|
Loading…
Reference in New Issue