summaryrefslogtreecommitdiff
path: root/elisp
diff options
context:
space:
mode:
authorjao <jao@gnu.org>2022-03-03 16:47:45 +0000
committerjao <jao@gnu.org>2022-03-03 16:47:45 +0000
commita996559ac34fe93ce9a448b23b7a9fbc23c002eb (patch)
tree64e00561fd62fb1da4e0b14337ac94c221e82ede /elisp
parented6d6a1b362fe389acb7f7e1bf6d89ff88e060af (diff)
downloadgeiser-a996559ac34fe93ce9a448b23b7a9fbc23c002eb.tar.gz
geiser-a996559ac34fe93ce9a448b23b7a9fbc23c002eb.tar.bz2
Fix #36: make sure default-directory is set before starting the process
Diffstat (limited to 'elisp')
-rw-r--r--elisp/geiser-repl.el6
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)