]> git.ekhem.eu.org Git - guix.git/commitdiff
[emacs] Set Guile environment variables in dir-locals.
authorJakub Czajka <jakub@ekhem.eu.org>
Sat, 20 Jun 2026 20:58:16 +0000 (22:58 +0200)
committerJakub Czajka <jakub@ekhem.eu.org>
Wed, 24 Jun 2026 22:53:14 +0000 (00:53 +0200)
.dir-locals.el now sets GUILE_LOAD_PATH and GUILE_LOAD_COMPILED_PATH
so that Emacs can compile Guile files with guild compile. TAGS file is
no longer necessary as geiser provides references.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
.dir-locals.el
.gitignore

index 5f793fd0f99bbab605e2415ba0137d53ba9d2634..be83265663c71c10a759487ef126905af61dae52 100644 (file)
@@ -1,8 +1,22 @@
-;; Copyright (c) 2022-2024 Jakub Czajka <jakub@ekhem.eu.org>
+;; Copyright (c) 2022-2026 Jakub Czajka <jakub@ekhem.eu.org>
 ;; License: GPL-3.0 or later.
 
-((scheme-mode . ((tags-file-name . "~/conf/TAGS")
-                (eval add-to-list
-                      'completion-at-point-functions
-                      'tags-completion-at-point-function
-                      t))))
+((scheme-mode
+  . ((eval . (setenv "GUIX_PACKAGE_PATH"
+                     (expand-file-name
+                      (locate-dominating-file
+                       default-directory
+                       ".dir-locals.el"))))
+     (eval . (setenv
+              "GUILE_LOAD_PATH"
+              (concat
+               (expand-file-name
+                "~/.config/guix/current/share/guile/site/3.0")
+               ":" (or (getenv "GUILE_LOAD_PATH") ""))))
+     (eval . (setenv
+              "GUILE_LOAD_COMPILED_PATH"
+              (concat
+               (expand-file-name
+                "~/.config/guix/current/lib/guile/3.0/site-ccache")
+               ":"
+               (or (getenv "GUILE_LOAD_COMPILED_PATH") "")))))))
index 3eecfb91842f7c121f126b7e95ebeef8f9b35c81..045ef6d1188ec8e686e3d94713268313a52b80fa 100644 (file)
@@ -1,2 +1 @@
-TAGS
 .dir-locals.el