From: Jakub Czajka Date: Sat, 20 Jun 2026 22:38:14 +0000 (+0200) Subject: [emacs] Add geiser-guile and flymake-guile for Scheme editing. X-Git-Url: https://git.ekhem.eu.org/?a=commitdiff_plain;h=ae2416f2d597ee4134d468f99b2a91701c96918b;p=guix.git [emacs] Add geiser-guile and flymake-guile for Scheme editing. 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 --- diff --git a/.dir-locals.el b/.dir-locals.el index be83265..ba5f06c 100644 --- a/.dir-locals.el +++ b/.dir-locals.el @@ -1,6 +1,12 @@ ;; Copyright (c) 2022-2026 Jakub Czajka ;; 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 diff --git a/emacs/.config/emacs/conf/conf-lisp.el b/emacs/.config/emacs/conf/conf-lisp.el index d496b05..60c2e81 100644 --- a/emacs/.config/emacs/conf/conf-lisp.el +++ b/emacs/.config/emacs/conf/conf-lisp.el @@ -1,7 +1,7 @@ -;; Copyright (c) 2022-2024 Jakub Czajka +;; Copyright (c) 2022-2026 Jakub Czajka ;; 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) @@ -10,4 +10,22 @@ ;; `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)