[climacs-devel] buffer-object vs. element* and such

Aleksandar Bakic a_bakic at yahoo.com
Fri Jan 14 21:33:03 UTC 2005


Hi,

Some recent changes to buffer.lisp broke my experimental code that uses a
non-standard buffer class. Namely, code like this:

(defmethod end-of-line ((mark mark-mixin))
  (let* ((offset (offset mark))
	 (buffer (buffer mark))
	 (chain (slot-value buffer 'contents))
	 (size (nb-elements chain)))
    (loop until (or (= offset size)
		    (eql (element* chain offset) #\Newline))
	  do (incf offset))
    (setf (offset mark) offset)))

The above method is specialized on mark-mixin only, not on standard-buffer.
However, since recently it calls nb-elements and element*. I would rather see
size and buffer-object instead. There are similar calls in, say,
redisplay-with-syntax in syntax.lisp, where one would expect the code not to
depend on flexichain. On other places, such as caching for fast redisplay, the
dependence on flexichain is explicit and that is fine with me (I need to take a
closer look at caching and see how it relates to non-standard buffers).

Please let me know if I can make changes wrt. the above arguments or if you
have objections.

Thanks,
Alex


	
		
__________________________________ 
Do you Yahoo!? 
Yahoo! Mail - You care about security. So do we. 
http://promotions.yahoo.com/new_mail



More information about the climacs-devel mailing list