summaryrefslogtreecommitdiff
path: root/elisp/geiser-mode.el
diff options
context:
space:
mode:
authorJose Antonio Ortega Ruiz <jao@gnu.org>2010-03-07 05:16:20 +0100
committerJose Antonio Ortega Ruiz <jao@gnu.org>2010-03-07 05:16:20 +0100
commita7d5b74b8fcda5952da0557bcd5d3cbb45fc6403 (patch)
tree48bfa6f97f9ba4543886fb3d27d600d95ab3a2e7 /elisp/geiser-mode.el
parent6301342e046ccca8a981c072b1968496b0e9e43a (diff)
downloadgeiser-a7d5b74b8fcda5952da0557bcd5d3cbb45fc6403.tar.gz
geiser-a7d5b74b8fcda5952da0557bcd5d3cbb45fc6403.tar.bz2
New command to switch to REPL and put it in current module.
Diffstat (limited to 'elisp/geiser-mode.el')
-rw-r--r--elisp/geiser-mode.el10
1 files changed, 8 insertions, 2 deletions
diff --git a/elisp/geiser-mode.el b/elisp/geiser-mode.el
index d083973..3e0f522 100644
--- a/elisp/geiser-mode.el
+++ b/elisp/geiser-mode.el
@@ -1,6 +1,6 @@
;; geiser-mode.el -- minor mode for scheme buffers
-;; Copyright (C) 2009 Jose Antonio Ortega Ruiz
+;; Copyright (C) 2009, 2010 Jose Antonio Ortega Ruiz
;; This program is free software; you can redistribute it and/or
;; modify it under the terms of the Modified BSD License. You should
@@ -150,6 +150,12 @@ With prefix, recursively macro-expand the resulting expression."
(geiser-impl--set-buffer-implementation impl)
(geiser-repl--get-repl impl)))
+(defun geiser-mode-switch-to-repl (arg)
+ "Switches to Geiser REPL.
+With prefix, try to enter the current's buffer module."
+ (interactive "P")
+ (if arg (switch-to-geiser-module) (switch-to-geiser)))
+
;;; Geiser mode:
@@ -201,7 +207,7 @@ interacting with the Geiser REPL is at your disposal.
(define-key geiser-mode-map (vector '(control ?c) `(control ,p) k) c)
(define-key geiser-mode-map (vector '(control ?c) `(control ,p) `(control ,k)) c))
-(define-key geiser-mode-map "\C-c\C-z" 'switch-to-geiser)
+(define-key geiser-mode-map "\C-c\C-z" 'geiser-mode-switch-to-repl)
(define-key geiser-mode-map "\C-c\C-s" 'geiser-set-scheme)
(define-key geiser-mode-map "\C-c\C-l" 'geiser-load-current-buffer)