diff options
Diffstat (limited to 'elisp')
-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 |