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

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

[nongnu] elpa/emacsql 016f2bf05a 330/427: Give up compiling at compile t


From: ELPA Syncer
Subject: [nongnu] elpa/emacsql 016f2bf05a 330/427: Give up compiling at compile time.
Date: Tue, 13 Dec 2022 02:59:58 -0500 (EST)

branch: elpa/emacsql
commit 016f2bf05a43a340470d4470f5c12c7f1531ef85
Author: Christopher Wellons <wellons@nullprogram.com>
Commit: Christopher Wellons <wellons@nullprogram.com>

    Give up compiling at compile time.
    
    How did this ever work in the first place ...?
---
 emacsql-sqlite.el | 39 +++++++++++++++++----------------------
 1 file changed, 17 insertions(+), 22 deletions(-)

diff --git a/emacsql-sqlite.el b/emacsql-sqlite.el
index fae07dd136..40e484412e 100644
--- a/emacsql-sqlite.el
+++ b/emacsql-sqlite.el
@@ -45,19 +45,17 @@ version."
 
 ;;; SQLite connection
 
-(cl-eval-when (load compile)
-  (defvar emacsql-sqlite-data-root
-    (file-name-directory (or load-file-name buffer-file-name))
-    "Directory where EmacSQL is installed."))
-
-(cl-eval-when (load compile)
-  (defvar emacsql-sqlite-executable
-    (expand-file-name (format "bin/emacsql-sqlite-%s%s" (emacsql-system-tuple)
-                              (if (memq system-type '(windows-nt cygwin 
ms-dos))
-                                  ".exe"
-                                ""))
-                      emacsql-sqlite-data-root)
-    "Path to the EmacSQL backend (this is not the sqlite3 shell)."))
+(defvar emacsql-sqlite-data-root
+  (file-name-directory (or load-file-name buffer-file-name))
+  "Directory where EmacSQL is installed.")
+
+(defvar emacsql-sqlite-executable
+  (expand-file-name (format "bin/emacsql-sqlite-%s%s" (emacsql-system-tuple)
+                            (if (memq system-type '(windows-nt cygwin ms-dos))
+                                ".exe"
+                              ""))
+                    emacsql-sqlite-data-root)
+  "Path to the EmacSQL backend (this is not the sqlite3 shell).")
 
 (defvar emacsql-sqlite-reserved
   (emacsql-register-reserved
@@ -244,15 +242,12 @@ This works like `url-copy-file' but actually checks for 
errors."
       (unless (emacsql-sqlite-fetch-binary)
         (error "No EmacSQL SQLite binary available, aborting")))))
 
-(cl-eval-when (compile)
-  (let* ((bin-name (file-name-nondirectory emacsql-sqlite-executable))
-         (new-root (file-name-directory byte-compile-current-file))
-         (emacsql-sqlite-executable
-          (expand-file-name bin-name (concat new-root "bin/"))))
-    (when (and (not (file-exists-p emacsql-sqlite-executable))
-               (equal (file-name-nondirectory byte-compile-current-file)
-                      "emacsql-sqlite.el"))
-      (ignore-errors (emacsql-sqlite-compile 2)))))
+(let* ((bin-name (file-name-nondirectory emacsql-sqlite-executable))
+       (emacsql-sqlite-executable
+        (expand-file-name bin-name
+                          (expand-file-name "bin" emacsql-sqlite-data-root))))
+  (unless (file-exists-p emacsql-sqlite-executable)
+    (ignore-errors (emacsql-sqlite-compile 2))))
 
 (provide 'emacsql-sqlite)
 



reply via email to

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