summaryrefslogtreecommitdiff
path: root/elisp/geiser-mode.el
diff options
context:
space:
mode:
authorJose Antonio Ortega Ruiz <jao@gnu.org>2010-11-13 02:31:39 +0100
committerJose Antonio Ortega Ruiz <jao@gnu.org>2010-11-13 02:31:39 +0100
commit69efb94a50ca6e8120a7a08d6ccf8216625c8519 (patch)
tree242f3726d8aea0717aad7599c85904537c666825 /elisp/geiser-mode.el
parent1853b281918ea8c6e143ed1cfe1950189956d076 (diff)
downloadgeiser-chez-69efb94a50ca6e8120a7a08d6ccf8216625c8519.tar.gz
geiser-chez-69efb94a50ca6e8120a7a08d6ccf8216625c8519.tar.bz2
geiser-mode-auto-p: automatic geiser-mode is now optional
It hadn't occurred to me that anyone wouldn't want non-automatic geiser-mode often enough to require its own customization variable. Rotty proved me wrong. Or maybe not, but he deserves a custom var!
Diffstat (limited to 'elisp/geiser-mode.el')
-rw-r--r--elisp/geiser-mode.el9
1 files changed, 9 insertions, 0 deletions
diff --git a/elisp/geiser-mode.el b/elisp/geiser-mode.el
index 719176d..8f8b7fe 100644
--- a/elisp/geiser-mode.el
+++ b/elisp/geiser-mode.el
@@ -34,6 +34,12 @@
"Mode enabling Geiser abilities in Scheme buffers &co.."
:group 'geiser)
+(geiser-custom--defcustom geiser-mode-auto-p t
+ "Whether `geiser-mode' should be active by default in all
+scheme buffers."
+ :group 'geiser-mode
+ :type 'boolean)
+
(geiser-custom--defcustom geiser-mode-autodoc-p t
"Whether `geiser-autodoc-mode' gets enabled by default in Scheme buffers."
:group 'geiser-mode
@@ -250,6 +256,9 @@ interacting with the Geiser REPL is at your disposal.
(interactive)
(geiser-mode -1))
+(defun geiser-mode--maybe-activate ()
+ (when geiser-mode-auto-p (turn-on-geiser-mode)))
+
;;; Keys: