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

[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 ================================================================
 
 



reply via email to

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