summaryrefslogtreecommitdiff
path: root/elisp/geiser-repl.el
diff options
context:
space:
mode:
authorAlex Kost <alezost@gmail.com>2015-09-16 16:19:36 +0300
committerAlex Kost <alezost@gmail.com>2015-09-16 16:19:36 +0300
commit5e0262cd6420c909faac7bddeaca50d1bcac1f5d (patch)
treebc319e51b6c9fca862f67df05cb5a8ffca554199 /elisp/geiser-repl.el
parent286f2ef2785932a498b1bf797528c4bd12ead6ac (diff)
downloadgeiser-5e0262cd6420c909faac7bddeaca50d1bcac1f5d.tar.gz
geiser-5e0262cd6420c909faac7bddeaca50d1bcac1f5d.tar.bz2
Add 'geiser-repl-buffer-name-function' variable
Diffstat (limited to 'elisp/geiser-repl.el')
-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)