Index: /branches/ide-1.0/ccl/hemlock/src/cursor.lisp
===================================================================
--- /branches/ide-1.0/ccl/hemlock/src/cursor.lisp	(revision 6577)
+++ /branches/ide-1.0/ccl/hemlock/src/cursor.lisp	(revision 6578)
@@ -145,14 +145,13 @@
 ;;;
 (defun cached-real-line-length (line width start end)
-  (declare (fixnum width start end))
-  (let* ((buffer (line-%buffer line))
-         (offset (- (buffer-right-open-pos buffer) (buffer-left-open-pos buffer)))
+  (declare (fixnum width start end) (ignore line))
+  (let ((offset (- *right-open-pos* *left-open-pos*))
 	(bound 0))
     (declare (fixnum offset bound))
     (cond
-     ((>= start (buffer-left-open-pos buffer))
+     ((>= start *left-open-pos*)
       (setq start (+ start offset)  bound (setq end (+ end offset))))
-     ((> end (buffer-left-open-pos buffer))
-      (setq bound (buffer-left-open-pos buffer)  end (+ end offset)))
+     ((> end *left-open-pos*)
+      (setq bound *left-open-pos*  end (+ end offset)))
      (t
       (setq bound end)))
@@ -167,6 +166,6 @@
       (when (= start bound)
 	(when (= start end) (return (values xpos ypos)))
-	(setq start (buffer-right-open-pos buffer)  bound end))
-      (setq losing (%fcwa (buffer-open-chars buffer) start bound losing-char))
+	(setq start *right-open-pos*  bound end))
+      (setq losing (%fcwa *open-chars* start bound losing-char))
       (cond
        (losing
@@ -174,8 +173,8 @@
 	  (truncate (+ xpos (- losing start)) width))
 	(setq ypos (+ ypos dy)  start losing)
-	(do ((last (or (%fcwa (buffer-open-chars buffer) start bound winning-char) bound)) str)
+	(do ((last (or (%fcwa *open-chars* start bound winning-char) bound)) str)
 	    ((= start last))
 	  (declare (fixnum last))
-	  (setq str (get-rep (schar (buffer-open-chars buffer) start)))
+	  (setq str (get-rep (schar *open-chars* start)))
 	  (incf start)
 	  (unless (simple-string-p str) (setq str (funcall str xpos)))
@@ -297,10 +296,9 @@
   an infinitely wide screen.  This takes into account tabs and control
   characters."
-  (let* ((charpos (mark-charpos mark))
-         (line (mark-line mark))
-         (buffer (line-%buffer line)))
-    (if (eq line (buffer-open-line buffer))
-      (values (cached-real-line-length line 10000 0 charpos))
-      (values (real-line-length line 10000 0 charpos)))))
+  (let ((charpos (mark-charpos mark))
+	(line (mark-line mark)))
+    (if (eq line *open-line*)
+	(values (cached-real-line-length line 10000 0 charpos))
+	(values (real-line-length line 10000 0 charpos)))))
 
 
@@ -312,6 +310,5 @@
 ;;;
 (defun find-position (line position start end width)
-  (do* ((buffer (line-%buffer line))
-        (cached (eq line (buffer-open-line buffer)))
+  (do* ((cached (eq line *open-line*))
 	(lo start)
 	(hi (1- end))
