summaryrefslogtreecommitdiff
path: root/elisp
diff options
context:
space:
mode:
Diffstat (limited to 'elisp')
-rw-r--r--elisp/geiser-repl.el13
1 files changed, 13 insertions, 0 deletions
diff --git a/elisp/geiser-repl.el b/elisp/geiser-repl.el
index 7b50c4a..2d3f26e 100644
--- a/elisp/geiser-repl.el
+++ b/elisp/geiser-repl.el
@@ -35,6 +35,15 @@
"Interacting with the Geiser REPL."
:group 'geiser)
+(geiser-custom--defcustom geiser-repl-buffer-name-function
+ 'geiser-repl-buffer-name
+ "Function used to define the name of a REPL buffer.
+The function is called with a single argument - an implementation
+symbol (e.g., `guile', `chicken', etc.)."
+ :type '(choice (function-item geiser-repl-buffer-name)
+ (function :tag "Other function"))
+ :group 'geiser-repl)
+
(geiser-custom--defcustom geiser-repl-use-other-window t
"Whether to Use a window other than the current buffer's when
switching to the Geiser REPL buffer."
@@ -247,6 +256,10 @@ module command as a string")
(format "%s REPL" (geiser-impl--impl-str impl)))
(defsubst geiser-repl--buffer-name (impl)
+ (funcall geiser-repl-buffer-name-function impl))
+
+(defun geiser-repl-buffer-name (impl)
+ "Return default name of the REPL buffer for implementation IMPL."
(format "* %s *" (geiser-repl--repl-name impl)))
(defun geiser-repl--switch-to-buffer (buffer)