emacs-elpa-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[elpa] externals/org ea487bffb5: org-fold-hide-drawer-all: Do not use po


From: ELPA Syncer
Subject: [elpa] externals/org ea487bffb5: org-fold-hide-drawer-all: Do not use point and mark when no region is active
Date: Sun, 18 Feb 2024 06:58:23 -0500 (EST)

branch: externals/org
commit ea487bffb57dc0fc4579ad23ec1fa842cd457baa
Author: Ihor Radchenko <yantar92@posteo.net>
Commit: Ihor Radchenko <yantar92@posteo.net>

    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.
---
 lisp/org-fold.el | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/lisp/org-fold.el b/lisp/org-fold.el
index 4052a59b0e..754cb2ee4a 100644
--- a/lisp/org-fold.el
+++ b/lisp/org-fold.el
@@ -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)))



reply via email to

[Prev in Thread] Current Thread [Next in Thread]