3 ((indent-tabs-mode . nil)
7 (let ((top (locate-dominating-file default-directory ".dir-locals.el"))))
9 (defun guile--manual-look-up (id mod)
10 (message "guile--manual-look-up id=%s => %s mod=%s" id (symbol-name id) mod)
11 (let ((info-lookup-other-window-flag
12 geiser-guile-manual-lookup-other-window-p))
13 (info-lookup-symbol (symbol-name id) 'scheme-mode))
14 (when geiser-guile-manual-lookup-other-window-p
15 (switch-to-buffer-other-window "*info*"))
16 (search-forward (format "%s" id) nil t))
18 (add-hook 'before-save-hook 'delete-trailing-whitespace nil t)
20 (defun guix-switch-profile (&optional profile)
21 "reset Emacs' environment by snarfing PROFILE/etc/profile"
23 (defun matches-in-string (regexp string)
24 "return a list of matches of REGEXP in STRING."
28 (while (string-match regexp string (match-end 0))
29 (push (or (match-string 1 string) (match-string 0 string)) matches)))
32 (interactive "fprofile: ")
33 (let* ((output (shell-command-to-string (concat "GUIX_PROFILE= /bin/sh -x " profile "/etc/profile")))
34 (exports (matches-in-string "^[+] export \\(.*\\)" output)))
35 (mapcar (lambda (line) (apply #'setenv (split-string line "="))) exports )))
38 (indent-tabs-mode . t))
41 ((geiser-active-implementations . (guile))
45 (defun prefix-dir-locals-dir (elt)
46 (concat (locate-dominating-file buffer-file-name ".dir-locals.el") elt))
48 (lambda (dir) (add-to-list 'geiser-guile-load-path dir))
50 #'prefix-dir-locals-dir
51 '("scripts" "guile")))))))
52 (texinfo-mode . ((indent-tabs-mode . nil)