]> git.ekhem.eu.org Git - guix.git/commitdiff
[emacs] Add geiser-guile and flymake-guile for Scheme editing.
authorJakub Czajka <jakub@ekhem.eu.org>
Sat, 20 Jun 2026 22:38:14 +0000 (00:38 +0200)
committerJakub Czajka <jakub@ekhem.eu.org>
Wed, 24 Jun 2026 22:53:20 +0000 (00:53 +0200)
Configure geiser-guile and flymake-guile in conf-lisp.el, gated on the
guile binary being present for portability.  Document the Lisp/Scheme
ecosystem and the environment variables set in .dir-locals.el.

Update .dir-locals.el copyright year to 2026.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
.dir-locals.el
emacs/.config/emacs/conf/conf-lisp.el

index be83265663c71c10a759487ef126905af61dae52..ba5f06cbb2e5288526813b65030d9803546c47d7 100644 (file)
@@ -1,6 +1,12 @@
 ;; Copyright (c) 2022-2026 Jakub Czajka <jakub@ekhem.eu.org>
 ;; License: GPL-3.0 or later.
 
+;; In order to compile guile files for GNU Guix, the compiler need to have the
+;; necessary symbols in its GUILE_LOAD_PATH and precompiled symbols in
+;; GUILE_LOAD_COMPILED_PATH. Unfortunately, the guild command comes from the
+;; root profile and may have outdated libraries compared to the code in the home
+;; profile. Thus, it is necessary to update these load paths to point to the home
+;; guile installation.
 ((scheme-mode
   . ((eval . (setenv "GUIX_PACKAGE_PATH"
                      (expand-file-name
index d496b05c9cf0aa2fb7440e3d240459916d9622a2..60c2e815c01799eaef185d8c5d73bda95fcb43fc 100644 (file)
@@ -1,7 +1,7 @@
-;; 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.
 ;;
-;; conf-lisp.el - configuration for list mode.
+;; conf-lisp.el - configuration for Lisp and Scheme editing.
 
 (require 'conf-package)
 
   ;; `electric-pair-mode' automatically adds closing parens.
   (emacs-lisp-mode . electric-pair-mode))
 
+;; Geiser integrates with the guile REPL for symbols and documentation.
+;; geiser-guile is a guile backend for geiser.
+(use-package geiser-guile
+  :when
+  (conf:executables-p (list "guile"))
+  :ensure t
+  :hook
+  (scheme-mode . geiser-mode))
+
+;; See comment in .dir-locals.el.
+(use-package flymake-guile
+  :when
+  (conf:executables-p (list "guile"))
+  :ensure t
+  :hook
+  (scheme-mode . flymake-guile)
+  (scheme-mode . flymake-mode))
+
 (provide 'conf-lisp)