summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNicolas Goaziou <mail@nicolasgoaziou.fr>2020-04-18 12:13:34 +0200
committerNicolas Goaziou <mail@nicolasgoaziou.fr>2020-04-18 18:34:56 +0200
commitcd9e000d86b874b60bb9b1f5d24440df611d8d2e (patch)
treeef9ebe6de428003357b5d185fa9abb9a4ab067aa
parent09f1b74f25becfbe5417d7316dbbab94d68ab0e8 (diff)
downloadorg-mode-cd9e000d86b874b60bb9b1f5d24440df611d8d2e.tar.gz
Deprecate `org-hide-block-toggle-maybe'
* lisp/org.el (org-hide-block-all): Use `org-hide-block-toggle'. (org-hide-block-toggle-maybe): move... * lisp/org-compat.el (org-hide-block-toggle-maybe): ... here.
-rw-r--r--lisp/org-compat.el8
-rw-r--r--lisp/org.el9
2 files changed, 9 insertions, 8 deletions
diff --git a/lisp/org-compat.el b/lisp/org-compat.el
index 97eda92..162e66e 100644
--- a/lisp/org-compat.el
+++ b/lisp/org-compat.el
@@ -653,6 +653,14 @@ region as a drawer without further ado."
(when (invisible-p (max (1- (point)) (point-min)))
(goto-char post)))))))
+(defun org-hide-block-toggle-maybe ()
+ "Toggle visibility of block at point.
+Unlike to `org-hide-block-toggle', this function does not throw
+an error. Return a non-nil value when toggling is successful."
+ (declare (obsolete "use `org-hide-block-toggle' instead." "Org 9.4"))
+ (interactive)
+ (ignore-errors (org-hide-block-toggle)))
+
(defmacro org-with-silent-modifications (&rest body)
(declare (obsolete "use `with-silent-modifications' instead." "Org 9.2")
(debug (body)))
diff --git a/lisp/org.el b/lisp/org.el
index 8afc023..7f90257 100644
--- a/lisp/org.el
+++ b/lisp/org.el
@@ -5960,13 +5960,6 @@ heading to appear."
;;;; Blocks visibility
-(defun org-hide-block-toggle-maybe ()
- "Toggle visibility of block at point.
-Unlike to `org-hide-block-toggle', this function does not throw
-an error. Return a non-nil value when toggling is successful."
- (interactive)
- (ignore-errors (org-hide-block-toggle)))
-
(defun org-hide-block-toggle (&optional force no-error element)
"Toggle the visibility of the current block.
@@ -6020,7 +6013,7 @@ Return a non-nil value when toggling is successful."
"Fold all blocks in the current buffer."
(interactive)
(org-show-all '(blocks))
- (org-block-map 'org-hide-block-toggle-maybe))
+ (org-block-map 'org-hide-block-toggle))
;;;; Drawers visibility