diff options
author | Vasilij Schneidermann <mail@vasilij.de> | 2020-11-28 10:22:50 +0100 |
---|---|---|
committer | Vasilij Schneidermann <mail@vasilij.de> | 2020-11-28 10:22:59 +0100 |
commit | f3b7cee8fcb4cbcfe0d62228c7061a555d11277a (patch) | |
tree | 453f3a7fea7fe8f8e0ed68ca1a296d0ace2a303c | |
parent | f49af903ed1d04641f3ea8d3a320db1da5c0a116 (diff) |
Fix Org warnings
-rw-r--r-- | nov.el | 38 |
1 files changed, 24 insertions, 14 deletions
@@ -856,20 +856,30 @@ See also `nov-bookmark-make-record'." (when (and (eq major-mode 'nov-mode) nov-file-name) (when (not (integerp nov-documents-index)) (setq nov-documents-index 0)) - (org-store-link-props - :type "nov" - :link (format "nov:%s::%d:%d" nov-file-name nov-documents-index (point)) - :description (format "EPUB file at %s" nov-file-name)))) - -(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 - (org-link-set-parameters - "nov" - :follow 'nov-org-link-follow - :store 'nov-org-link-store))) + (let ((org-store-props-function + (if (version< org-version "9.3") + 'org-store-link-props + 'org-link-store-props)) + (link (format "nov:%s::%d:%d" + nov-file-name + nov-documents-index + (point))) + (description (format "EPUB file at %s" nov-file-name))) + (funcall org-store-props-function + :type "nov" + :link link + :description description)))) + +(with-suppressed-warnings ((obsolete org-add-link-type)) + (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 + (org-link-set-parameters + "nov" + :follow 'nov-org-link-follow + :store 'nov-org-link-store)))) ;;; Imenu interop |