summaryrefslogtreecommitdiff
path: root/elisp
diff options
context:
space:
mode:
authorJose Antonio Ortega Ruiz <jao@gnu.org>2009-03-16 02:56:11 +0100
committerJose Antonio Ortega Ruiz <jao@gnu.org>2009-03-16 02:56:11 +0100
commit880d17da7bdd08da11dd3c8d55da98b1f8c34b0c (patch)
tree1889bd98322e78903458a15b32b486a5eec414c0 /elisp
parentbedcd027dced5111cc1a2fa91ba34c3d71b226d2 (diff)
downloadgeiser-chez-880d17da7bdd08da11dd3c8d55da98b1f8c34b0c.tar.gz
geiser-chez-880d17da7bdd08da11dd3c8d55da98b1f8c34b0c.tar.bz2
Key for geiser-set-scheme in geiser-mode.
Diffstat (limited to 'elisp')
-rw-r--r--elisp/geiser-impl.el32
-rw-r--r--elisp/geiser-mode.el2
2 files changed, 17 insertions, 17 deletions
diff --git a/elisp/geiser-impl.el b/elisp/geiser-impl.el
index 2cec381..cdda479 100644
--- a/elisp/geiser-impl.el
+++ b/elisp/geiser-impl.el
@@ -35,7 +35,7 @@
"Generic support for multiple Scheme implementations."
:group 'geiser)
-(defcustom geiser-impl-default-implementation 'guile
+(defcustom geiser-impl-default-implementation nil
"Symbol naming the default Scheme implementation."
:type 'symbol
:group 'geiser-impl)
@@ -64,19 +64,30 @@
(let ((impl (or impl geiser-impl--implementation)))
(and impl (capitalize (format "%s" impl)))))
+(defsubst geiser-impl--impl-feature (impl)
+ (intern (format "geiser-%s" impl)))
+
;;; Installing Scheme implementations:
(make-variable-buffer-local
(defvar geiser-impl--implementation nil))
-(defsubst geiser-impl--impl-feature (impl)
- (intern (format "geiser-%s" impl)))
+(defvar geiser-impl--impl-prompt-history nil)
+
+(defun geiser-impl--read-impl (&optional prompt impls non-req)
+ (let* ((impls (or impls geiser-impl--impls))
+ (impls (mapcar (lambda (s) (format "%s" s)) impls))
+ (prompt (or prompt "Scheme implementation: ")))
+ (intern (completing-read prompt impls nil (not non-req) nil
+ geiser-impl--impl-prompt-history
+ (and (car geiser-impl--impls)
+ (symbol-name (car geiser-impl--impls)))))))
(defun geiser-impl--set-buffer-implementation (&optional impl)
(let ((impl (or impl
(geiser-impl--guess)
- (intern (read-string "Scheme implementation: ")))))
+ (geiser-impl--read-impl nil nil t))))
(require (geiser-impl--impl-feature impl))
(setq geiser-impl--implementation impl)
(geiser-impl--install-eval impl)
@@ -174,19 +185,6 @@ implementation to be used by Geiser."))
(geiser-impl--default-implementation)))
-;;; User commands:
-(defvar geiser-impl--impl-prompt-history nil)
-
-(defun geiser-impl--read-impl (&optional prompt impls)
- (let* ((impls (or impls geiser-impl--impls))
- (impls (mapcar (lambda (s) (format "%s" s)) impls))
- (prompt (or prompt "Scheme implementation: ")))
- (intern (completing-read prompt impls nil t nil
- geiser-impl--impl-prompt-history
- (and (car geiser-impl--impls)
- (symbol-name (car geiser-impl--impls)))))))
-
-
;;; Unload support
(defun geiser-impl-unload-function ()
diff --git a/elisp/geiser-mode.el b/elisp/geiser-mode.el
index 3e9e3c1..3a57ec7 100644
--- a/elisp/geiser-mode.el
+++ b/elisp/geiser-mode.el
@@ -189,6 +189,8 @@ interacting with the Geiser REPL is at your disposal.
(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-s" 'geiser-set-scheme)
+
(define-key geiser-mode-map "\C-c\C-l" 'geiser-load-current-buffer)
(define-key geiser-mode-map "\C-c\C-k" 'geiser-compile-current-buffer)