diff options
| author | Craig Jennings <c@cjennings.net> | 2026-05-05 09:21:06 -0500 |
|---|---|---|
| committer | Craig Jennings <c@cjennings.net> | 2026-05-05 09:21:06 -0500 |
| commit | 9e25494338c7c3093d0c4f52783d75ebc0757514 (patch) | |
| tree | f835d6f3547bf181e9825a05df68e94cc6128755 | |
| parent | 0d6791694cc5b26ea3aeda83a9fe0c5c7c1810ea (diff) | |
| download | org-drill-9e25494338c7c3093d0c4f52783d75ebc0757514.tar.gz org-drill-9e25494338c7c3093d0c4f52783d75ebc0757514.zip | |
refactor: drop Org <9.6 compat shims
Two dead branches removed:
- (when (version< org-version "9.2") ...) advice on org-get-tags,
plus the org-drill-get-tags-advice helper that backed it. Org 9.2
shipped the new arity in 2018 — well below our org>=9.6 floor.
- (when (= 8 (car ...)) ...) Org 8.x defalias shim that wrapped
org-latex-preview around org-preview-latex-fragment. Org 8 hasn't
been a target for years and is below the org>=9.6 floor.
Both are now genuinely dead after the dep bump in 75b1601.
| -rw-r--r-- | org-drill.el | 23 |
1 files changed, 0 insertions, 23 deletions
diff --git a/org-drill.el b/org-drill.el index 33b491c..dad46cb 100644 --- a/org-drill.el +++ b/org-drill.el @@ -731,29 +731,6 @@ regardless of whether the test was successful.") (put 'org-drill-left-cloze-delimiter 'safe-local-variable 'stringp) (put 'org-drill-right-cloze-delimiter 'safe-local-variable 'stringp) -;;; Org compatability hacks -(when (version< org-version "9.2") - (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) - ;; Fallback to original function if org-get-local-tags doesn't exist - (apply orig-fun args)) - ;; the non-arg version doesn't return inherited tags, but - ;; org-get-tags does. - (org-get-tags))) - -(with-no-warnings - (when (= 8 (car (version-to-list org-version))) - ;; Shut up package-lint - compatibility shim for org 8.x (package requires org >= 9.3) - (defalias 'org-drill-defun 'defun) - (org-drill-defun org-latex-preview (&rest args) - (apply 'org-preview-latex-fragment args)))) - ;;;; Utilities ================================================================ (defmacro org-drill-pop-random (place) "Remove an item randomly from PLACE." |
