forked from mirrors/org-mode
org-fold-hide-drawer-all: Do not use point and mark when no region is active
* lisp/org-fold.el (org-fold-hide-drawer-all): Do not unconditionally use point and mark. Only use region boundaries when the region is active.
This commit is contained in:
parent
388ba5b5c4
commit
ea487bffb5
|
@ -595,7 +595,8 @@ Return a non-nil value when toggling is successful."
|
|||
|
||||
(defun org-fold-hide-drawer-all (&optional begin end)
|
||||
"Fold all drawers in the current buffer or active region BEGIN..END."
|
||||
(interactive "r")
|
||||
(interactive (list (and (use-region-p) (region-beginning))
|
||||
(and (use-region-p) (region-end))))
|
||||
(let ((begin (or begin (point-min)))
|
||||
(end (or end (point-max))))
|
||||
(org-fold--hide-drawers begin end)))
|
||||
|
|
Loading…
Reference in New Issue