summaryrefslogtreecommitdiff
path: root/elisp
diff options
context:
space:
mode:
authorDavid Thompson <dthompson@vistahigherlearning.com>2022-08-30 08:25:23 -0400
committerDavid Thompson <dthompson@vistahigherlearning.com>2022-09-01 17:33:00 -0400
commit47b378367169c3de160600e28ab08820a6d4b49f (patch)
tree5441c74b99d15e60fe357e37f3c6b21dc816ef27 /elisp
parent40f03bbad917a16ffda0e4b5d5795a2875bc0428 (diff)
downloadgeiser-47b378367169c3de160600e28ab08820a6d4b49f.tar.gz
geiser-47b378367169c3de160600e28ab08820a6d4b49f.tar.bz2
Improve default names for per-project REPLs.
Diffstat (limited to 'elisp')
-rw-r--r--elisp/geiser-repl.el8
1 files changed, 7 insertions, 1 deletions
diff --git a/elisp/geiser-repl.el b/elisp/geiser-repl.el
index 469c0f5..26f4168 100644
--- a/elisp/geiser-repl.el
+++ b/elisp/geiser-repl.el
@@ -343,7 +343,13 @@ will be set up using `geiser-connect-local' when a REPL is started.")
(defun geiser-repl-buffer-name (impl)
"Return default name of the REPL buffer for implementation IMPL."
- (format "*Geiser %s*" (geiser-repl--repl-name impl)))
+ (let ((repl-name (geiser-repl--repl-name impl))
+ (current-project (funcall geiser-repl-current-project-function)))
+ (if (and geiser-repl-per-project-p current-project)
+ (let ((project-name (file-name-nondirectory
+ (directory-file-name current-project))))
+ (format "*Geiser %s: %s*" repl-name project-name))
+ (format "*Geiser %s*" repl-name))))
(defun geiser-repl--switch-to-buffer (buffer)
(unless (eq buffer (current-buffer))