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

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

[nongnu] elpa/emacsql 01f3d3eb2b 316/427: Fallback to buffer-file-name w


From: ELPA Syncer
Subject: [nongnu] elpa/emacsql 01f3d3eb2b 316/427: Fallback to buffer-file-name when load-file-name is nil
Date: Tue, 13 Dec 2022 02:59:54 -0500 (EST)

branch: elpa/emacsql
commit 01f3d3eb2b05f4c50ce9f30f3f561c865fd5ba95
Author: Jonas Bernoulli <jonas@bernoul.li>
Commit: Jonas Bernoulli <jonas@bernoul.li>

    Fallback to buffer-file-name when load-file-name is nil
    
    Without this loading the library by evaluating the buffer would fail.
---
 emacsql.el | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/emacsql.el b/emacsql.el
index bc8f07f5e5..1919b5c963 100644
--- a/emacsql.el
+++ b/emacsql.el
@@ -82,7 +82,8 @@
   "Maximum number of seconds to wait before bailing out on a SQL command.
 If nil, wait forever.")
 
-(defvar emacsql-data-root (file-name-directory load-file-name)
+(defvar emacsql-data-root
+  (file-name-directory (or load-file-name buffer-file-name))
   "Directory where EmacSQL is installed.")
 
 (defclass emacsql-connection ()



reply via email to

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