Index: /trunk/ccl/hemlock/src/listener.lisp
===================================================================
--- /trunk/ccl/hemlock/src/listener.lisp	(revision 718)
+++ /trunk/ccl/hemlock/src/listener.lisp	(revision 719)
@@ -25,5 +25,5 @@
 
 
-(defun pakage-name-change-hook (name kind where new-value)
+(defun package-name-change-hook (name kind where new-value)
   (declare (ignore name new-value))
   (if (eq kind :buffer)
@@ -450,18 +450,20 @@
 	  (t (region start end)))))
 
+(defun eval-region (region
+		    &key
+		    (package (value current-package))
+		    (path (buffer-pathname (current-buffer))))
+  (evaluate-input-selection
+   (ccl::make-input-selection
+    :package package
+    :source-file path
+    :string-stream (make-string-input-stream
+		    (region-to-string region)))))		    
+       
+					
+
 (defun editor-compile-region (region &optional quiet)
   (unless quiet (message "Compiling region ..."))
-  (in-lisp
-   (with-input-from-region (stream region)
-     (with-pop-up-display (*error-output* :height 19)
-       ;; JDz: We don't record source locations and what not, but this
-       ;; is portable.  CMUCL specific implementation removed because
-       ;; it does not work on HEMLOCK-REGION-STREAM (but it can be
-       ;; added back later if CMUCL starts using user-extensible
-       ;; streams internally.)
-       (funcall (compile nil `(lambda ()
-                                ,@(loop for form = (read stream nil stream)
-                                        until (eq form stream)
-                                        collect form))))))))
+  (eval-region region))
 
 
@@ -472,10 +474,6 @@
   (declare (ignore p))
   (if (region-active-p)
-      (editor-evaluate-region-command nil)
-      (with-input-from-region (stream (defun-region (current-point)))
-	(clear-echo-area)
-	(in-lisp
-	 (message "Editor Evaluation returned ~S"
-		  (eval (read stream)))))))
+    (editor-evaluate-region-command nil)
+    (eval-region (defun-region (current-point)))))
 
 (defcommand "Editor Evaluate Region" (p)
@@ -483,14 +481,5 @@
   "Evaluates lisp forms between the point and the mark in the editor Lisp."
   (declare (ignore p))
-  (with-input-from-region (stream (current-region))
-    (clear-echo-area)
-    (write-string "Evaluating region in the editor ..." *echo-area-stream*)
-    (finish-output *echo-area-stream*)
-    (in-lisp
-     (do ((object (read stream nil lispbuf-eof) 
-		  (read stream nil lispbuf-eof)))
-	 ((eq object lispbuf-eof))
-       (eval object)))
-    (message "Evaluation complete.")))
+  (eval-region (current-region)))
            
 (defcommand "Editor Re-evaluate Defvar" (p)
