diff options
author | jao <jao@gnu.org> | 2022-03-03 16:47:45 +0000 |
---|---|---|
committer | jao <jao@gnu.org> | 2022-03-03 16:47:45 +0000 |
commit | a996559ac34fe93ce9a448b23b7a9fbc23c002eb (patch) | |
tree | 64e00561fd62fb1da4e0b14337ac94c221e82ede /elisp/geiser-repl.el | |
parent | ed6d6a1b362fe389acb7f7e1bf6d89ff88e060af (diff) | |
download | geiser-a996559ac34fe93ce9a448b23b7a9fbc23c002eb.tar.gz geiser-a996559ac34fe93ce9a448b23b7a9fbc23c002eb.tar.bz2 |
Fix #36: make sure default-directory is set before starting the process
Diffstat (limited to 'elisp/geiser-repl.el')
-rw-r--r-- | elisp/geiser-repl.el | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/elisp/geiser-repl.el b/elisp/geiser-repl.el index 57ae204..bb91d7a 100644 --- a/elisp/geiser-repl.el +++ b/elisp/geiser-repl.el @@ -517,10 +517,13 @@ will be set up using `geiser-connect-local' when a REPL is started.") (defvar geiser-repl--last-scm-buffer) +(defun geiser-repl--set-default-directory () + (when-let (root (funcall geiser-repl-current-project-function)) + (setq-local default-directory root))) + (defun geiser-repl--set-up-load-path () (when geiser-repl-add-project-paths (when-let (root (funcall geiser-repl-current-project-function)) - (setq-local default-directory root) (dolist (p (cond ((eq t geiser-repl-add-project-paths) '(".")) ((listp geiser-repl-add-project-paths) geiser-repl-add-project-paths))) @@ -546,6 +549,7 @@ will be set up using `geiser-connect-local' when a REPL is started.") (prompt (geiser-con--combined-prompt prompt-rx deb-prompt-rx))) (unless prompt-rx (error "Sorry, I don't know how to start a REPL for %s" impl)) + (geiser-repl--set-default-directory) (geiser-repl--save-remote-data address) (geiser-repl--start-scheme impl address prompt) (geiser-repl--quit-setup) |