conf-scheme.el 989 B

123456789101112131415161718192021222324252627282930313233343536
  1. ;;; Code:
  2. (require 'geiser)
  3. (require 'geiser-mode)
  4. (require 'geiser-guile)
  5. (require 'paredit)
  6. (require 'rainbow-delimiters)
  7. (require 'flymake-guile)
  8. (setq geiser-mode-start-repl-p t
  9. ;; geiser-guile-load-init-file t
  10. geiser-default-implementation 'guile
  11. geiser-active-implementations '(guile))
  12. (defun distopico:fix-compile-goto-error ()
  13. "Fixes compile go to error adding guile load path."
  14. (let* ((shell-command "guile -c '(write %load-path)'")
  15. (shell-output (shell-command-to-string shell-command))
  16. (load-paths (car (read-from-string shell-output))))
  17. (dolist (path load-paths)
  18. (add-to-list 'compilation-search-path path))))
  19. (defun distopico:scheme-mode-hook ()
  20. "Scheme mode hook to enhance it."
  21. (enable-paredit-mode)
  22. (flymake-guile))
  23. (with-eval-after-load 'geiser-guile
  24. (require 'compile)
  25. (distopico:fix-compile-goto-error))
  26. ;; hooks
  27. (add-hook 'scheme-mode-hook #'distopico:scheme-mode-hook)
  28. (provide 'conf-scheme)
  29. ;;; conf-scheme.el ends here