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

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

[elpa] externals/elisa 252ba926f9 73/98: Add ability to customize extens


From: ELPA Syncer
Subject: [elpa] externals/elisa 252ba926f9 73/98: Add ability to customize extensions path
Date: Wed, 17 Jul 2024 18:58:06 -0400 (EDT)

branch: externals/elisa
commit 252ba926f9a1a027ace1b8853ef9943632a76c4e
Author: Sergey Kostyaev <kostyaev.sergey2@wb.ru>
Commit: Sergey Kostyaev <kostyaev.sergey2@wb.ru>

    Add ability to customize extensions path
---
 elisa.el | 32 ++++++++++++++++++++++----------
 1 file changed, 22 insertions(+), 10 deletions(-)

diff --git a/elisa.el b/elisa.el
index df404a47e1..2f7b6258e3 100644
--- a/elisa.el
+++ b/elisa.el
@@ -99,6 +99,16 @@
   :group 'elisa
   :type 'string)
 
+(defcustom elisa-sqlite-vss-path nil
+  "Path to sqlite-vss extension."
+  :group 'elisa
+  :type 'file)
+
+(defcustom elisa-sqlite-vector-path nil
+  "Path to sqlite-vector extension."
+  :group 'elisa
+  :type 'file)
+
 (defcustom elisa-semantic-split-function 'elisa-split-by-paragraph
   "Function for semantic text split."
   :group 'elisa
@@ -225,19 +235,21 @@ If set, all quotes with similarity less than threshold 
will be filtered out."
 
 (defun elisa--vss-path ()
   "Path to vss sqlite extension."
-  (let* ((ext (if (string-equal system-type "darwin")
-                 "dylib"
-               "so"))
-        (file (format "vss0.%s" ext)))
-    (file-name-concat elisa-db-directory file)))
+  (or elisa-sqlite-vss-path
+      (let* ((ext (if (string-equal system-type "darwin")
+                     "dylib"
+                   "so"))
+            (file (format "vss0.%s" ext)))
+       (file-name-concat elisa-db-directory file))))
 
 (defun elisa--vector-path ()
   "Path to vector sqlite extension."
-  (let* ((ext (if (string-equal system-type "darwin")
-                 "dylib"
-               "so"))
-        (file (format "vector0.%s" ext)))
-    (file-name-concat elisa-db-directory file)))
+  (or elisa-sqlite-vector-path
+      (let* ((ext (if (string-equal system-type "darwin")
+                     "dylib"
+                   "so"))
+            (file (format "vector0.%s" ext)))
+       (file-name-concat elisa-db-directory file))))
 
 ;;;###autoload
 (defun elisa-download-sqlite-vss ()



reply via email to

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