diff options
author | David Thompson <dthompson2@worcester.edu> | 2022-09-06 12:50:37 -0400 |
---|---|---|
committer | David Thompson <dthompson2@worcester.edu> | 2022-09-06 12:50:37 -0400 |
commit | f68b7487c56b4a2840b4348eae26e55472842598 (patch) | |
tree | d9b2d739bdaf5d3f827249ffa902047994c98718 | |
parent | 59b042a666edd6f854ee65d52474cff8efeeb233 (diff) |
Update Emacs config.
-rw-r--r-- | dotfiles/.emacs.d/init.el | 30 |
1 files changed, 17 insertions, 13 deletions
diff --git a/dotfiles/.emacs.d/init.el b/dotfiles/.emacs.d/init.el index e032018..2adaabe 100644 --- a/dotfiles/.emacs.d/init.el +++ b/dotfiles/.emacs.d/init.el @@ -56,6 +56,8 @@ ;;; (use-package guix + :config + (add-hook 'scheme-mode-hook 'guix-devel-mode) :custom ;; Load modules from the guix obtained via 'guix pull'. (guix-load-path '("~/.guix/current/share/guile/site/3.0")) @@ -277,27 +279,29 @@ might be bad." (use-package paredit :config - (add-hook 'emacs-lisp-mode-hook (lambda () (paredit-mode t))) - (add-hook 'lisp-mode-hook (lambda () (paredit-mode t))) - (add-hook 'lisp-data-mode-hook (lambda () (paredit-mode t))) - (add-hook 'lisp-interaction-mode-hook (lambda () (paredit-mode t))) - (add-hook 'scheme-mode-hook (lambda () (paredit-mode t)))) + (add-hook 'emacs-lisp-mode-hook #'paredit-mode) + (add-hook 'lisp-mode-hook #'paredit-mode) + (add-hook 'lisp-data-mode-hook #'paredit-mode) + (add-hook 'lisp-interaction-mode-hook #'paredit-mode) + (add-hook 'scheme-mode-hook #'paredit-mode)) (use-package geiser :config (use-package geiser-guile) ;; Flycheck-guile only works if Geiser is around. - (use-package flycheck-guile) + (use-package flycheck-guile + :config + (add-hook 'scheme-mode-hook #'flycheck-mode)) ;; Use project-aware REPL buffer naming so it's clear which REPL ;; belongs to which project. (defun repl-buffer-name (impl) - (if geiser-repl-per-project-p - (format "*Geiser %s: %s*" - (geiser-repl--repl-name impl) - (file-name-nondirectory - (directory-file-name - (funcall geiser-repl-current-project-function)))) - (format "*Geiser %s*" (geiser-repl--repl-name impl)))) + (let ((repl-name (geiser-repl--repl-name impl)) + (current-project (funcall geiser-repl-current-project-function))) + (if (and geiser-repl-per-project-p current-project) + (let ((project-name (file-name-nondirectory + (directory-file-name current-project)))) + (format "*Geiser %s: %s*" repl-name project-name)) + (format "*Geiser %s*" repl-name)))) (setq geiser-repl-buffer-name-function #'repl-buffer-name) :custom ((geiser-active-implementations '(guile)) ;; One REPL per project, please! |