branch: elpa/systemd
commit 16be18350c98fc7625d3929445a32e21811e60e5
Author: Mark Oteiza <mvote...@udel.edu>
Commit: Mark Oteiza <mvote...@udel.edu>

    don't indiscriminately use relative file name
---
 systemd.el | 10 ++++++++--
 1 file changed, 8 insertions(+), 2 deletions(-)

diff --git a/systemd.el b/systemd.el
index 3a02136..3c42a25 100644
--- a/systemd.el
+++ b/systemd.el
@@ -83,7 +83,10 @@
 (defconst systemd-unit-directives
   (eval-when-compile
     (with-temp-buffer
-      (insert-file-contents "unit-directives.txt")
+      (insert-file-contents
+       (let ((f "unit-directives.txt"))
+         (if (null load-file-name) f
+           (expand-file-name f (file-name-directory load-file-name)))))
       (split-string (buffer-string))))
   "Configuration directives for systemd.")
 
@@ -96,7 +99,10 @@
 (defconst systemd-network-directives
   (eval-when-compile
     (with-temp-buffer
-      (insert-file-contents "network-directives.txt")
+      (insert-file-contents
+       (let ((f "network-directives.txt"))
+         (if (null load-file-name) f
+           (expand-file-name f (file-name-directory load-file-name)))))
       (split-string (buffer-string))))
   "Network configuration directives for systemd.")
 

Reply via email to