summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--elisp/geiser-repl.el14
-rw-r--r--news.org1
2 files changed, 11 insertions, 4 deletions
diff --git a/elisp/geiser-repl.el b/elisp/geiser-repl.el
index a6c2e92..ede0bef 100644
--- a/elisp/geiser-repl.el
+++ b/elisp/geiser-repl.el
@@ -1,6 +1,6 @@
;;; geiser-repl.el --- Geiser's REPL
-;; Copyright (C) 2009, 2010, 2011, 2012, 2013, 2015, 2016, 2018, 2019, 2020, 2021 Jose Antonio Ortega Ruiz
+;; Copyright (C) 2009-2022 Jose Antonio Ortega Ruiz
;; This program is free software; you can redistribute it and/or
;; modify it under the terms of the Modified BSD License. You should
@@ -51,13 +51,19 @@ See also `geiser-repl-current-project-function' for the function
used to discover a buffer's project."
:type 'boolean)
+(declare project-root "project.el")
+(declare project-current "project.el")
+
+(defun geiser-repl--project ()
+ (when-let (p (project-current)) (project-root p)))
+
(geiser-custom--defcustom geiser-repl-current-project-function
- (if (featurep 'project) #'project-current 'ignore)
+ (if (featurep 'project) #'geiser-repl--project 'ignore)
"Function used to determine the current project.
The function is called from both source and REPL buffers, and
should return a value which uniquely identifies the project."
:type '(choice (function-item :tag "Ignore projects" ignore)
- (function-item :tag "Use Project.el" project-current)
+ (function-item :tag "Use Project.el" geiser-repl--project)
(function-item :tag "Use Projectile" projectile-project-root)
(function :tag "Other function")))
@@ -511,7 +517,7 @@ will be set up using `geiser-connect-local' when a REPL is started.")
(defun geiser-repl--set-up-load-path ()
(when geiser-repl-add-project-paths
- (when-let (root (cdr (funcall geiser-repl-current-project-function)))
+ (when-let (root (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)))
diff --git a/news.org b/news.org
index 365a18e..decd207 100644
--- a/news.org
+++ b/news.org
@@ -1,5 +1,6 @@
* Version 0.22.1
- Fix for C-u C-x C-e (in-buffer printing of evaluated expression)
+ - Fix for project functions other than project-current
* Version 0.22 (December, 2021)
- New functions geiser-wait-eval and geiser-eval-region/wait for
synchronous clients like ob-scheme.