summaryrefslogtreecommitdiff
path: root/elisp/geiser-repl.el
diff options
context:
space:
mode:
authorjao <jao@gnu.org>2021-12-18 21:03:34 +0000
committerjao <jao@gnu.org>2021-12-18 21:03:34 +0000
commit476897e4f8a101d808ee0a0a97cc98a46d079af6 (patch)
tree24c30aefdafbbc732e41e6c5786c7f79d1aac4ec /elisp/geiser-repl.el
parent365764db5e3e07042f83d120595421770db771b2 (diff)
downloadgeiser-476897e4f8a101d808ee0a0a97cc98a46d079af6.tar.gz
geiser-476897e4f8a101d808ee0a0a97cc98a46d079af6.tar.bz2
new geiser-repl-per-project-p to control per-project REPLs
And we still need some fixes here when that's active, specifically for the case when you travel to a file outside the current project: it becomes repeless, which is a sad state.
Diffstat (limited to 'elisp/geiser-repl.el')
-rw-r--r--elisp/geiser-repl.el9
1 files changed, 8 insertions, 1 deletions
diff --git a/elisp/geiser-repl.el b/elisp/geiser-repl.el
index c16444a..eefbd81 100644
--- a/elisp/geiser-repl.el
+++ b/elisp/geiser-repl.el
@@ -45,6 +45,12 @@ symbol (e.g., `guile', `chicken', etc.)."
:type '(choice (function-item geiser-repl-buffer-name)
(function :tag "Other function")))
+(geiser-custom--defcustom geiser-repl-per-project-p nil
+ "Whether to spawn a separate REPL per project.
+See also `geiser-repl-current-project-function' for the function
+used to discover a buffer's project."
+ :type 'boolean)
+
(geiser-custom--defcustom geiser-repl-current-project-function
(if (featurep 'project) #'project-current 'ignore)
"Function used to determine the current project.
@@ -269,7 +275,8 @@ module command as a string")
(setq geiser-repl--project p))
(defsubst geiser-repl--current-project ()
- (or (funcall geiser-repl-current-project-function)
+ (or (when geiser-repl-per-project-p
+ (funcall geiser-repl-current-project-function))
'no-project))
(defun geiser-repl--live-p ()