overlay.el bug, incompatable overlays-in

FKtPp m_pupil at yahoo.com.cn
Sun Feb 24 20:17:39 EST 2008


--- "Stephen J. Turnbull" <stephen at xemacs.org> wrote:

> It's me FKtPp ;) writes:
> 
>  > Then I composed the second path, whth BEG and END limited in range
> [0,
>  > (buffer-size)], but, again, I find this even worse:
>  >   XEmacs don't accept 0 as extend/overlay starting point, and
> report
>  > "Argment out of range"
> 
> That's right.  The buffer indexing scheme is really broken, thanks to
> Emacs compatibility.  Buffer positions do not point at characters,
> they point at insertion points between characters, plus one at each
> end.  It would make sense to number these 0 ... n, but no, that's not
> the way it's done.  Instead, they're numbered 1 ... n+1.
> 
>  >   (buffer-size) is 1 character less than (point-max) in a widen
> buffer.
>  > The second copy is totally broken... :'( sorry for no testing
>  > 
>  > After some rethought I change the range to [1, (1+ (buffer-size))]
> , and
>  > run some code assumed would be failed if using the official XEmacs
>  > overlay.el.
> 
> Is this working now for your needs?
> 

Yes, It prevent me from encounter the "args out of range" error for now
at least.



      ____________________________________________________________________________________
Be a better friend, newshound, and 
know-it-all with Yahoo! Mobile.  Try it now.  http://mobile.yahoo.com/;_ylt=Ahu06i62sR8HDtDypao8Wcj9tAcJ 



More information about the XEmacs-Patches mailing list