diff options
author | Alex Kost <alezost@gmail.com> | 2015-09-16 16:19:36 +0300 |
---|---|---|
committer | Alex Kost <alezost@gmail.com> | 2015-09-16 16:19:36 +0300 |
commit | 8224381c5d7ecdfd2339d94e2aba9a0bfb8d3240 (patch) | |
tree | c8b952c8dff2913383cfbb492a579869cd724af0 /elisp | |
parent | d075d57edd2f005fe81380541266fcb46352401c (diff) | |
download | geiser-guile-8224381c5d7ecdfd2339d94e2aba9a0bfb8d3240.tar.gz geiser-guile-8224381c5d7ecdfd2339d94e2aba9a0bfb8d3240.tar.bz2 |
Add 'geiser-repl-buffer-name-function' variable
Diffstat (limited to 'elisp')
-rw-r--r-- | elisp/geiser-repl.el | 13 |
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) |