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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[elpa] externals/org-contacts 0501463909 149/154: Also detect whether or


From: ELPA Syncer
Subject: [elpa] externals/org-contacts 0501463909 149/154: Also detect whether org API function `org-add-link-type' available.
Date: Fri, 9 Sep 2022 15:58:56 -0400 (EDT)

branch: externals/org-contacts
commit 0501463909d3d10432c7948517146bff2d471293
Author: stardiviner <numbchild@gmail.com>
Commit: stardiviner <numbchild@gmail.com>

    Also detect whether org API function `org-add-link-type' available.
---
 org-contacts.el | 9 ++++++---
 1 file changed, 6 insertions(+), 3 deletions(-)

diff --git a/org-contacts.el b/org-contacts.el
index a965bc51d9..8e75884335 100644
--- a/org-contacts.el
+++ b/org-contacts.el
@@ -1212,7 +1212,8 @@ link string and return the pure link target."
 ;; so everything is in order for its use in Org files
 (if (fboundp 'org-link-set-parameters)
     (org-link-set-parameters "tel")
-  (org-add-link-type "tel"))
+  (if (fboundp 'org-add-link-type)
+      (org-add-link-type "tel")))
 
 (defun org-contacts-split-property (string &optional separators omit-nulls)
   "Custom version of `split-string'.
@@ -1259,7 +1260,8 @@ are effectively trimmed).  If nil, all zero-length 
substrings are retained."
                              :complete #'org-contacts-link-complete
                              :store #'org-contacts-link-store
                              :face 'org-contacts-link-face)
-  (org-add-link-type "org-contact" 'org-contacts-link-open))
+  (if (fboundp 'org-add-link-type)
+      (org-add-link-type "org-contact" 'org-contacts-link-open)))
 
 ;;;###autoload
 (defun org-contacts-link-store ()
@@ -1353,7 +1355,8 @@ Each element has the form (NAME . (FILE . POSITION))."
 ;;; org-mode link "mailto:"; email completion.
 (if (fboundp 'org-link-set-parameters)
     (org-link-set-parameters "mailto" :complete 
#'org-contacts-mailto-link-completion)
-  (org-add-link-type "mailto"))
+  (if (fboundp 'org-add-link-type)
+      (org-add-link-type "mailto")))
 
 (defun org-contacts-mailto-link--get-all-emails ()
   "Retrieve all org-contacts EMAIL property values."



reply via email to

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