Skip to content

Commit fcec94f

Browse files
committed
fix(org): update load, declare-function
In Emacs 31, org-element-property and org-element-type have moved to a new file: org-element-ast. Update code to handle this properly. Signed-off-by: Bruce D'Arcus <[email protected]>
1 parent 02e25f3 commit fcec94f

File tree

1 file changed

+8
-3
lines changed

1 file changed

+8
-3
lines changed

citar-org.el

+8-3
Original file line numberDiff line numberDiff line change
@@ -21,15 +21,20 @@
2121

2222
(require 'citar)
2323
(require 'org)
24-
(require 'org-element)
24+
(if (not (require 'org-element-ast nil t))
25+
;; they moved the functions we need to this file
26+
;; if it's not present, fallback to the old one
27+
(require 'org-element))
2528
(require 'org-id)
2629
(require 'oc)
2730
(require 'oc-basic)
2831
(require 'oc-csl)
2932

3033
(declare-function org-open-at-point "org")
31-
(declare-function org-element-property "org-element")
32-
(declare-function org-element-type "org-element")
34+
;; we need to account for the move of these functions to a different file
35+
(declare-function org-element-property nil)
36+
(declare-function org-element-type nil)
37+
3338
(declare-function org-cite-make-insert-processor "oc")
3439
(declare-function org-cite-get-references "oc")
3540
(declare-function embark-act "ext:embark")

0 commit comments

Comments
 (0)