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

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

[elpa] externals/kiwix dc72a3a 121/192: add wikipedia: Org Mode link by


From: Stefan Monnier
Subject: [elpa] externals/kiwix dc72a3a 121/192: add wikipedia: Org Mode link by default now
Date: Sat, 19 Dec 2020 00:41:45 -0500 (EST)

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

    add wikipedia: Org Mode link by default now
---
 kiwix.el | 30 ++++++++++++++----------------
 1 file changed, 14 insertions(+), 16 deletions(-)

diff --git a/kiwix.el b/kiwix.el
index f7bc4fe..f5c65d9 100644
--- a/kiwix.el
+++ b/kiwix.el
@@ -101,12 +101,6 @@
   :type 'string
   :group 'kiwix-mode)
 
-;;;###autoload
-(defcustom kiwix-support-org-mode-link t
-  "Add support for Org-mode Kiwix link."
-  :type 'boolean
-  :group 'kiwix-mode)
-
 (defvar kiwix-libraries
   (when (kiwix-dir-detect)
     (mapcar #'(lambda (var)
@@ -337,24 +331,28 @@ for query string and library interactively."
                             :description query)
       link)))
 
-(defvar kiwix-mode-map
-  (let ((map (make-sparse-keymap)))
-    map)
-  "kiwix-mode map.")
+;;;###autoload
+(org-link-set-parameters "wikipedia" ; NOTE: use `wikipedia' for future 
backend changing.
+                         :follow #'org-wikipedia-link-open
+                         :store #'org-wikipedia-store-link
+                         :export #'org-wikipedia-link-export)
+
+;;;###autoload
+(add-hook 'org-store-link-functions 'org-wikipedia-store-link t)
 
 (defun kiwix-mode-enable ()
   "Enable kiwix-mode."
-  (when kiwix-support-org-mode-link
-    (org-link-set-parameters "wikipedia" ; NOTE: use `wikipedia' for future 
backend changing.
-                             :follow #'org-wikipedia-link-open
-                             :store #'org-wikipedia-store-link
-                             :export #'org-wikipedia-link-export)
-    (add-hook 'org-store-link-functions 'org-wikipedia-store-link t)))
+  )
 
 (defun kiwix-mode-disable ()
   "Disable kiwix-mode."
   )
 
+(defvar kiwix-mode-map
+  (let ((map (make-sparse-keymap)))
+    map)
+  "kiwix-mode map.")
+
 ;;;###autoload
 (define-minor-mode kiwix-mode
   "Kiwix global minor mode for searching Kiwix serve."



reply via email to

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