diff options
author | jao <jao@gnu.org> | 2021-12-05 20:14:37 +0000 |
---|---|---|
committer | jao <jao@gnu.org> | 2021-12-05 20:14:37 +0000 |
commit | 365764db5e3e07042f83d120595421770db771b2 (patch) | |
tree | 0b711d8d0de396631989844fe14e435b315dfff8 | |
parent | a998dd8a81dbecb5cbb285d99afe749307f604be (diff) | |
download | geiser-365764db5e3e07042f83d120595421770db771b2.tar.gz geiser-365764db5e3e07042f83d120595421770db771b2.tar.bz2 |
Wee refactoring
-rw-r--r-- | elisp/geiser-repl.el | 15 |
1 files changed, 9 insertions, 6 deletions
diff --git a/elisp/geiser-repl.el b/elisp/geiser-repl.el index 4696ec8..c16444a 100644 --- a/elisp/geiser-repl.el +++ b/elisp/geiser-repl.el @@ -496,6 +496,14 @@ module command as a string") (defvar geiser-repl--last-scm-buffer) +(defun geiser-repl--set-up-load-path () + (when geiser-repl-add-project-paths + (when-let (root (cdr (funcall geiser-repl-current-project-function))) + (dolist (p (cond ((eq t geiser-repl-add-project-paths) '(".")) + ((listp geiser-repl-add-project-paths) + geiser-repl-add-project-paths))) + (geiser-add-to-load-path (expand-file-name p root)))))) + (defun geiser-repl--start-repl (impl address) (message "Starting Geiser REPL ...") (when (not address) (geiser-repl--check-version impl)) @@ -527,12 +535,7 @@ module command as a string") (geiser-repl--startup impl address) (geiser-repl--autodoc-mode 1) (geiser-company--setup geiser-repl-company-p) - (when geiser-repl-add-project-paths - (when-let (root (cdr (funcall geiser-repl-current-project-function))) - (dolist (p (cond ((eq t geiser-repl-add-project-paths) '(".")) - ((listp geiser-repl-add-project-paths) - geiser-repl-add-project-paths))) - (geiser-add-to-load-path (expand-file-name p root))))) + (geiser-repl--set-up-load-path) (add-hook 'comint-output-filter-functions 'geiser-repl--output-filter nil |