aboutsummaryrefslogtreecommitdiff
path: root/nov.el
diff options
context:
space:
mode:
authorVasilij Schneidermann <mail@vasilij.de>2021-02-28 22:25:21 +0100
committerVasilij Schneidermann <mail@vasilij.de>2021-02-28 22:25:35 +0100
commitb6138895ace3042ed78140b6f4859e544fbca27e (patch)
tree3127faf597d8f2a971434882d4fb5d1b9d69eeb1 /nov.el
parent86616b3a2ec9664f5091c312166ae3c9eb05354c (diff)
Use more robust Org API check
Diffstat (limited to 'nov.el')
-rw-r--r--nov.el16
1 files changed, 8 insertions, 8 deletions
diff --git a/nov.el b/nov.el
index aac7c21..0080176 100644
--- a/nov.el
+++ b/nov.el
@@ -858,9 +858,9 @@ See also `nov-bookmark-make-record'."
(when (not (integerp nov-documents-index))
(setq nov-documents-index 0))
(let ((org-store-props-function
- (if (version< org-version "9.3")
- 'org-store-link-props
- 'org-link-store-props))
+ (if (fboundp 'org-link-store-props)
+ 'org-link-store-props
+ 'org-store-link-props))
(link (format "nov:%s::%d:%d"
nov-file-name
nov-documents-index
@@ -872,14 +872,14 @@ See also `nov-bookmark-make-record'."
:description description))))
(cond
- ((version< org-version "9.0")
- (org-add-link-type "nov" 'nov-org-link-follow)
- (add-hook 'org-store-link-functions 'nov-org-link-store))
- (t
+ ((fboundp 'org-link-set-parameters)
(org-link-set-parameters
"nov"
:follow 'nov-org-link-follow
- :store 'nov-org-link-store)))
+ :store 'nov-org-link-store))
+ ((fboundp 'org-add-link-type)
+ (org-add-link-type "nov" 'nov-org-link-follow)
+ (add-hook 'org-store-link-functions 'nov-org-link-store)))
;;; Imenu interop