[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[nongnu] elpa/org-contrib 9b46d53474 2/2: lisp/org-toc.el: Fix all the c
From: |
ELPA Syncer |
Subject: |
[nongnu] elpa/org-contrib 9b46d53474 2/2: lisp/org-toc.el: Fix all the compiler warnings |
Date: |
Sat, 20 Jan 2024 07:00:31 -0500 (EST) |
branch: elpa/org-contrib
commit 9b46d534747c3ce88ed851bcd82c6e7c3d4759b0
Author: Ihor Radchenko <yantar92@posteo.net>
Commit: Ihor Radchenko <yantar92@posteo.net>
lisp/org-toc.el: Fix all the compiler warnings
* lisp/org-toc.el (org-toc-cycle-subtree):
(org-toc-goto):
(org-toc-restore-config): Address obsolete functions in Org 9.6.
---
lisp/org-toc.el | 20 +++++++++++++++-----
1 file changed, 15 insertions(+), 5 deletions(-)
diff --git a/lisp/org-toc.el b/lisp/org-toc.el
index 73a8eea295..497849613a 100644
--- a/lisp/org-toc.el
+++ b/lisp/org-toc.el
@@ -196,7 +196,9 @@ specified, then make `org-toc-recenter' use this value."
(setq ov (make-overlay beg end)))
;; change the folding status of this headline
(cond ((or (null status) (eq status 'folded))
- (org-show-children)
+ (if (fboundp 'org-fold-show-children)
+ (org-fold-show-children)
+ (with-no-warnings (org-show-children)))
(message "CHILDREN")
(overlay-put ov 'status 'children))
((eq status 'children)
@@ -289,9 +291,15 @@ If CYCLE is non-nil, cycle the targeted subtree in the Org
window."
(if cycle (org-cycle)
(progn (org-overview)
(if org-toc-show-subtree-mode
- (org-show-subtree)
- (org-show-entry))
- (org-show-context)))
+ (if (fboundp 'org-fold-show-subtree)
+ (org-fold-show-subtree)
+ (with-no-warnings (org-show-subtree)))
+ (if (fboundp 'org-fold-show-entry)
+ (org-fold-show-entry)
+ (with-no-warnings (org-show-entry))))
+ (if (fboundp 'org-fold-show-context)
+ (org-fold-show-context)
+ (with-no-warnings (org-show-context)))))
(if org-toc-recenter-mode
(if (>= org-toc-recenter 1000) (recenter)
(recenter org-toc-recenter)))
@@ -440,7 +448,9 @@ current table of contents to it."
(setq ov (make-overlay (match-beginning 0)
(match-end 0))))
(cond ((eq (cdr hlcfg0) 'children)
- (org-show-children)
+ (if (fboundp 'org-fold-show-children)
+ (org-fold-show-children)
+ (with-no-warnings (org-show-children)))
(message "CHILDREN")
(overlay-put ov 'status 'children))
((eq (cdr hlcfg0) 'branches)