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

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

[elpa] externals/kiwix 7fda411 184/192: fix org-link-set-parameters func


From: Stefan Monnier
Subject: [elpa] externals/kiwix 7fda411 184/192: fix org-link-set-parameters functions not available when Org not loaded
Date: Sat, 19 Dec 2020 00:41:57 -0500 (EST)

branch: externals/kiwix
commit 7fda4115d5f762f9a2c1db10406ab2562119050e
Author: stardiviner <numbchild@gmail.com>
Commit: stardiviner <numbchild@gmail.com>

    fix org-link-set-parameters functions not available when Org not loaded
---
 .gitignore   |  1 +
 kiwix.el     |  3 ---
 org-kiwix.el | 17 ++++++++---------
 3 files changed, 9 insertions(+), 12 deletions(-)

diff --git a/.gitignore b/.gitignore
index 9b4291b..044805e 100644
--- a/.gitignore
+++ b/.gitignore
@@ -3,3 +3,4 @@
 
 # Packaging
 .cask
+/*~
diff --git a/kiwix.el b/kiwix.el
index 178d58d..f773c37 100644
--- a/kiwix.el
+++ b/kiwix.el
@@ -40,9 +40,6 @@
 (require 'request)
 (if (featurep 'ivy) (require 'ivy))
 
-(autoload 'org-link-set-parameters "org")
-(autoload 'org-store-link-props "org")
-
 (defgroup kiwix-mode nil
   "Kiwix customization options."
   :group 'kiwix-mode)
diff --git a/org-kiwix.el b/org-kiwix.el
index 6ccc672..7f293b0 100644
--- a/org-kiwix.el
+++ b/org-kiwix.el
@@ -1,6 +1,6 @@
 ;;; org-kiwix.el --- Org Mode link support -*- lexical-binding: t; -*-
 
-;;; Time-stamp: <2020-04-28 10:38:02 stardiviner>
+;;; Time-stamp: <2020-05-04 07:04:56 stardiviner>
 
 ;;; Commentary:
 
@@ -110,14 +110,13 @@
             (completing-read "Available keywords: " keywords))))
 
 ;;;###autoload
-(org-link-set-parameters "wikipedia" ; NOTE: use `wikipedia' for future 
backend changing.
-                         :follow #'org-wikipedia-open-link
-                         :store #'org-wikipedia-store-link
-                         :export #'org-wikipedia-export-link
-                         :complete #'org-wikipedia-complete-link)
-
-;;;###autoload
-(add-hook 'org-store-link-functions 'org-wikipedia-store-link t)
+(with-eval-after-load 'org
+  (org-link-set-parameters "wikipedia" ; NOTE: use `wikipedia' for future 
backend changing.
+                           :follow #'org-wikipedia-open-link
+                           :store #'org-wikipedia-store-link
+                           :export #'org-wikipedia-export-link
+                           :complete #'org-wikipedia-complete-link)
+  (add-hook 'org-store-link-functions 'org-wikipedia-store-link t))
 
 
 



reply via email to

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