[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[nongnu] elpa/org-drill 3b0f44592f 186/251: Add compatibility hacks to s
From: |
ELPA Syncer |
Subject: |
[nongnu] elpa/org-drill 3b0f44592f 186/251: Add compatibility hacks to support org-mode 8 |
Date: |
Mon, 17 Jan 2022 18:59:16 -0500 (EST) |
branch: elpa/org-drill
commit 3b0f44592f857b1e849f2190ef92835a7ea6b84f
Author: Phillip Lord <phillip.lord@russet.org.uk>
Commit: Phillip Lord <phillip.lord@russet.org.uk>
Add compatibility hacks to support org-mode 8
We do not really need to support org-mode 8 but as it is the default
install it makes it easier to test from a clean emacs.
---
org-drill.el | 19 ++++++++++++++++---
1 file changed, 16 insertions(+), 3 deletions(-)
diff --git a/org-drill.el b/org-drill.el
index c808ebbaae..d6ac8cf4e1 100644
--- a/org-drill.el
+++ b/org-drill.el
@@ -65,8 +65,6 @@
:tag "Org-Drill"
:group 'org-link)
-
-
(defcustom org-drill-question-tag
"drill"
"Tag which topics must possess in order to be identified as review topics
@@ -649,7 +647,6 @@ random number to another language.")
:documentation "An org-drill session object carries data about
the current state of a particular org-drill session." )
-
(defvar org-drill-current-session nil)
(defvar org-drill-last-session nil)
@@ -706,6 +703,22 @@ regardless of whether the test was successful.")
(put 'org-drill-right-cloze-delimiter 'safe-local-variable 'stringp)
+;;; Org compatability hacks
+(defvar org-drill-org-8-p (string-prefix-p "8" org-version))
+(when org-drill-org-8-p
+ (advice-add 'org-get-tags :around #'org-drill-get-tags-advice))
+
+(defun org-drill-get-tags-advice (orig-fun &rest args)
+ ;; the two arg call obsoletes get-local-tags
+ (if (= 2 (length args))
+ ;; and we don't want any byte compile errors
+ (if (fboundp 'org-get-local-tags) (org-get-local-tags))
+ (funcall orig-fun)))
+
+(when org-drill-org-8-p
+ (defun org-toggle-latex-fragment (&rest args)
+ (apply 'org-prefix-latex-fragment args)))
+
;;;; Utilities ================================================================
- [nongnu] elpa/org-drill 118e76ff9c 154/251: Replace more non-namespaced command, (continued)
- [nongnu] elpa/org-drill 118e76ff9c 154/251: Replace more non-namespaced command, ELPA Syncer, 2022/01/17
- [nongnu] elpa/org-drill 20c90836aa 169/251: Speed up robot tests with polling, ELPA Syncer, 2022/01/17
- [nongnu] elpa/org-drill 1801524221 178/251: Fix call to format, ELPA Syncer, 2022/01/17
- [nongnu] elpa/org-drill 2f056255e6 192/251: Re-namespace with-hidden-cloze-text, ELPA Syncer, 2022/01/17
- [nongnu] elpa/org-drill 61807adc7f 166/251: Remove spell-number.el dependency, ELPA Syncer, 2022/01/17
- [nongnu] elpa/org-drill 0eaacf2a2d 176/251: Remove legacy code, ELPA Syncer, 2022/01/17
- [nongnu] elpa/org-drill 8ebb0d27d6 194/251: package-lint cleaning, ELPA Syncer, 2022/01/17
- [nongnu] elpa/org-drill c59c49a4df 172/251: Remove call to cl, ELPA Syncer, 2022/01/17
- [nongnu] elpa/org-drill c65634b454 195/251: Remove hi-lock dependency, ELPA Syncer, 2022/01/17
- [nongnu] elpa/org-drill 5d4f60d49d 167/251: Silence more unused variable messages, ELPA Syncer, 2022/01/17
- [nongnu] elpa/org-drill 3b0f44592f 186/251: Add compatibility hacks to support org-mode 8,
ELPA Syncer <=
- [nongnu] elpa/org-drill 2811c3f562 174/251: Replace dynamic scoping with let, ELPA Syncer, 2022/01/17
- [nongnu] elpa/org-drill 502961433b 196/251: Remove savehist dependency, ELPA Syncer, 2022/01/17
- [nongnu] elpa/org-drill 362c643163 182/251: Fix more compile error messages, ELPA Syncer, 2022/01/17
- [nongnu] elpa/org-drill dd55dbe699 187/251: Fix call to org-drill-entry-overdue-p, ELPA Syncer, 2022/01/17
- [nongnu] elpa/org-drill de11158c99 171/251: Replace more dynamic scoping, ELPA Syncer, 2022/01/17
- [nongnu] elpa/org-drill d6d940c9c5 170/251: Improve poll, ELPA Syncer, 2022/01/17
- [nongnu] elpa/org-drill 8644cfd761 184/251: Fix more byte compile errors, ELPA Syncer, 2022/01/17
- [nongnu] elpa/org-drill 56ddd56396 213/251: Update documentation, ELPA Syncer, 2022/01/17
- [nongnu] elpa/org-drill 03551ffa3c 231/251: Show LaTex overlays after clearing them, ELPA Syncer, 2022/01/17
- [nongnu] elpa/org-drill 7adb9aab5a 207/251: Update documentation, ELPA Syncer, 2022/01/17