[climacs-devel] number-of-lines-inregion
matthieu.villeneuve at free.fr
matthieu.villeneuve at free.fr
Sun Jan 23 19:26:38 UTC 2005
Quoting Rudi Schlatte <rudi at constantly.at>:
>
> On 23. Jän 2005, at 19:25, Aleksandar Bakic wrote:
>
> > Hi,
> >
> > Should the generic function number-of-lines-in-region be symmetrical
> > wrt. its
> > mark parameters? Recently, delete-region has been changed so that the
> > order of
> > mark offsets does not matter.
>
> I'd vote "yes".
>
> > In general, is there are rule by which one could
> > decide whether an operator on two marks should care about the mark
> > offset order
> > or not?
>
> My gut feeling is that code such as:
>
> (let ((mark1 (obtain-mark-1)) (mark2 (obtain-mark-2)))
> (operate-on-region mark1 mark2))
>
> should not have to check and exchange marks manually. So, I think most
> operations on regions should be order-agnostic.
I agree, I'd vote "yes" too.
I had written the function region-limits in gui.lisp, but in my
opinion it solves the problem at the wrong place, callers of
functions in base.lisp shouldn't worry about the order of marks.
--
Matthieu Villeneuve
More information about the climacs-devel
mailing list