diff options
author | Nicolas Goaziou <mail@nicolasgoaziou.fr> | 2020-05-10 02:22:19 +0200 |
---|---|---|
committer | Nicolas Goaziou <mail@nicolasgoaziou.fr> | 2020-05-10 02:22:19 +0200 |
commit | 1bf2b33e270c12339dda8033149b0f2fcc1ddd48 (patch) | |
tree | dff7c27a3f8c64125a4e58d389517fe2febd6715 | |
parent | a9ba5dc2dc9590008e614a8448fc7dfe3b5957c1 (diff) | |
download | org-mode-1bf2b33e270c12339dda8033149b0f2fcc1ddd48.tar.gz |
Refactor `org-global-cycle'
* lisp/org.el (org-global-cycle): Small refactoring. Always assume
`org-mode' as major mode. Show all is not necessary.
-rw-r--r-- | lisp/org.el | 21 |
1 files changed, 9 insertions, 12 deletions
diff --git a/lisp/org.el b/lisp/org.el index 7ce621d..6b24708 100644 --- a/lisp/org.el +++ b/lisp/org.el @@ -6479,18 +6479,15 @@ Use `\\[org-edit-special]' to edit table.el tables")) With `\\[universal-argument]' prefix ARG, switch to startup visibility. With a numeric prefix, show all headlines up to that level." (interactive "P") - (let ((org-cycle-include-plain-lists - (if (derived-mode-p 'org-mode) org-cycle-include-plain-lists nil))) - (cond - ((integerp arg) - (org-show-all '(headings blocks)) - (outline-hide-sublevels arg) - (setq org-cycle-global-status 'contents)) - ((equal arg '(4)) - (org-set-startup-visibility) - (org-unlogged-message "Startup visibility, plus VISIBILITY properties.")) - (t - (org-cycle '(4)))))) + (cond + ((integerp arg) + (org-content arg) + (setq org-cycle-global-status 'contents)) + ((equal arg '(4)) + (org-set-startup-visibility) + (org-unlogged-message "Startup visibility, plus VISIBILITY properties.")) + (t + (org-cycle '(4))))) (defun org-set-startup-visibility () "Set the visibility required by startup options and properties." |