summaryrefslogtreecommitdiff
path: root/elisp
diff options
context:
space:
mode:
authorJose Antonio Ortega Ruiz <jao@gnu.org>2009-03-01 16:41:09 +0100
committerJose Antonio Ortega Ruiz <jao@gnu.org>2009-03-01 16:41:09 +0100
commitb2ed8a68efd8a091e8c05e4914fe093fd4a38425 (patch)
tree2c76997443eb203583b29e0e9a8bee1d05fcc770 /elisp
parent8a320a41af2c56a1d1b09901e2eb931821984c11 (diff)
downloadgeiser-b2ed8a68efd8a091e8c05e4914fe093fd4a38425.tar.gz
geiser-b2ed8a68efd8a091e8c05e4914fe093fd4a38425.tar.bz2
Some refactoring and new ge:macroexpand.
Diffstat (limited to 'elisp')
-rw-r--r--elisp/geiser-debug.el7
-rw-r--r--elisp/geiser-eval.el10
-rw-r--r--elisp/geiser-mode.el21
3 files changed, 20 insertions, 18 deletions
diff --git a/elisp/geiser-debug.el b/elisp/geiser-debug.el
index c67a6aa..20db436 100644
--- a/elisp/geiser-debug.el
+++ b/elisp/geiser-debug.el
@@ -92,6 +92,13 @@
(insert "In expression:\n"))
(insert (format "%s%s\n" (make-string offset ?\ ) description))))
+(defun geiser-debug--send-region (compile start end and-go)
+ (let* ((ret (geiser-eval--send-region compile start end and-go))
+ (err (geiser-eval--retort-error ret)))
+ (if (not err)
+ (message (format "=> %s" (geiser-eval--retort-result ret)))
+ (geiser-debug--display-retort str ret))))
+
(provide 'geiser-debug)
;;; geiser-debug.el ends here
diff --git a/elisp/geiser-eval.el b/elisp/geiser-eval.el
index 09f12da..ca0460f 100644
--- a/elisp/geiser-eval.el
+++ b/elisp/geiser-eval.el
@@ -117,6 +117,16 @@
(defsubst geiser-eval--send/result (code &optional timeout buffer)
(geiser-eval--retort-result (geiser-eval--send/wait code timeout buffer)))
+(defun geiser-eval--send-region (compile start end and-go)
+ (let* ((str (buffer-substring-no-properties start end))
+ (code `(,(if compile :comp :eval) (:scm ,str)))
+ (ret (geiser-eval--send/wait code)))
+ (when and-go
+ (switch-to-guile)
+ (push-mark)
+ (goto-char (point-max)))
+ ret))
+
;;; Retort parsing:
diff --git a/elisp/geiser-mode.el b/elisp/geiser-mode.el
index a03c70e..fbbcff4 100644
--- a/elisp/geiser-mode.el
+++ b/elisp/geiser-mode.el
@@ -33,6 +33,7 @@
(require 'geiser-debug)
(require 'geiser-eval)
(require 'geiser-repl)
+(require 'geiser-popup)
(require 'geiser-custom)
(require 'geiser-base)
@@ -56,22 +57,6 @@
-;;; Auxiliary functions:
-
-(defun geiser-eval--send-region (compile start end and-go)
- (let* ((str (buffer-substring-no-properties start end))
- (code `(,(if compile :comp :eval) (:scm ,str)))
- (ret (geiser-eval--send/wait code))
- (err (geiser-eval--retort-error ret)))
- (when and-go
- (switch-to-guile)
- (push-mark)
- (goto-char (point-max)))
- (if (not err)
- (message (format "=> %s" (geiser-eval--retort-result ret)))
- (geiser-debug--display-retort str ret))))
-
-
;;; Evaluation commands:
(defun geiser-eval-region (start end &optional and-go)
@@ -79,7 +64,7 @@
With prefix, goes to the REPL buffer afterwards (as
`geiser-eval-region-and-go')"
(interactive "rP")
- (geiser-eval--send-region nil start end and-go))
+ (geiser-debug--send-region nil start end and-go))
(defun geiser-eval-region-and-go (start end)
"Eval the current region in the Geiser REPL and visit it afterwads."
@@ -116,7 +101,7 @@ With prefix, goes to the REPL buffer afterwards (as
(end-of-defun)
(let ((end (point)))
(beginning-of-defun)
- (geiser-eval--send-region t (point) end and-go))))
+ (geiser-debug--send-region t (point) end and-go))))
(defun geiser-compile-definition-and-go ()
"Compile the current definition in the Geiser REPL and visit it afterwads."