[climacs-devel] left-sticky-mark, etc.

Robert Strandh strandh at labri.fr
Wed Jan 26 05:01:43 UTC 2005


Aleksandar Bakic writes:
 > Because of the following method (and the right counterpart) in buffer.lisp:
 > 
 > (defmethod initialize-instance :after ((mark left-sticky-mark) &rest args &key
 > (offset 0))
 >   "Associates a created mark with the buffer it was created for."
 >   (declare (ignore args))
 >   (assert (<= 0 offset (size (buffer mark))) ()
 >           (make-condition 'no-such-offset :offset offset))
 >   (setf (slot-value mark 'cursor)
 >         (make-instance 'left-sticky-flexicursor
 >            :chain (slot-value (buffer mark) 'contents)
 >            :position offset)))
 > 
 > I had to define a new left-sticky-mark class because I did not use
 > left-sticky-flexicursor. Then very recently, I extended open-line to work on
 > left-sticky-mark and right-sticky-mark arguments, but it does not work on my
 > new classes. I tried replacing left-sticky-mark with standard-left-sticky-mark
 > above, and I did not see any problems. If these two :after methods were
 > specialized on standard marks, I would not need extra classes and things would
 > be simpler. Am I missing something?

Probably not.  I think that must be a mistake.  Go ahead and fix it if
you like. 

-- 
Robert Strandh

---------------------------------------------------------------------
Greenspun's Tenth Rule of Programming: any sufficiently complicated C
or Fortran program contains an ad hoc informally-specified bug-ridden
slow implementation of half of Common Lisp.
---------------------------------------------------------------------



More information about the climacs-devel mailing list