Index: /trunk/ccl/level-1/l1-error-system.lisp
===================================================================
--- /trunk/ccl/level-1/l1-error-system.lisp	(revision 6634)
+++ /trunk/ccl/level-1/l1-error-system.lisp	(revision 6635)
@@ -337,4 +337,16 @@
 (define-condition stream-error (error)
   ((stream :initarg :stream :reader stream-error-stream)))
+
+(defun stream-error-context (condition)
+  (let* ((stream (stream-error-stream condition)))
+    (with-output-to-string (s)
+       (format s "on steam ~s" stream)
+       (let* ((pos (ignore-errors (stream-position stream))))
+                             (when pos
+                               (format s ", near position ~d" pos)))
+                           (let* ((surrounding (stream-surrounding-characters stream)))
+                             (when surrounding
+                               (format s ", within ~s" surrounding))))))
+
 (define-condition parse-error (error) ())
 (define-condition parse-integer-not-integer-string (parse-error)
@@ -346,13 +358,13 @@
 (define-condition end-of-file (stream-error) ()
   (:report (lambda (c s)
-             (format s "Unexpected end of file on ~s" (stream-error-stream c)))))
+             (format s "Unexpected end of file ~s" (stream-error-context c)))))
 (define-condition impossible-number (reader-error)
   ((token :initarg :token :reader impossible-number-token)
    (condition :initarg :condition :reader impossible-number-condition))
   (:report (lambda (c s)
-             (format s "Condition of type ~s raised ~&while trying to parse numeric token ~s ~&on ~s"
+             (format s "Condition of type ~s raised ~&while trying to parse numeric token ~s ~&~s"
                      (type-of (impossible-number-condition c))
                      (impossible-number-token c)
-                     (stream-error-stream c)))))
+                     (stream-error-context c)))))
 
 
@@ -360,5 +372,5 @@
 (define-condition simple-stream-error (stream-error simple-condition) () 
   (:report (lambda (c s) 
-             (format s "Error on ~s : ~&~a" (stream-error-stream c) 
+             (format s "Error ~s : ~&~a" (stream-error-context c) 
                      (apply #'format
                             nil
@@ -367,8 +379,5 @@
 
 
-(define-condition modify-read-only-buffer (error) ()
-  (:report (lambda (c s)
-             (declare (ignore c))
-             (format s "Cannot modify a read-only buffer"))))
+
 
 (define-condition file-error (error)
