[Fwd: Re: overlay.el bug, incompatable overlays-in]
It's me FKtPp ;)
m_pupil at yahoo.com.cn
Fri Feb 29 11:36:59 EST 2008
yesterday message
-------- Original Message --------
Subject: Re: overlay.el bug, incompatable overlays-in
Date: Thu, 28 Feb 2008 22:38:46 +0800
From: It's me FKtPp ;) <m_pupil at yahoo.com.cn>
To: Stephen J. Turnbull <stephen at xemacs.org>
References: <87pruiyf25.fsf at uwakimon.sk.tsukuba.ac.jp>
<422857.49930.qm at web15003.mail.cnb.yahoo.com>
<87lk56xuas.fsf at uwakimon.sk.tsukuba.ac.jp>
Stephen J. Turnbull wrote:
> FKtPp writes:
>
> > As you can see, I am not very good at english,
>
> You get your point across; it doesn't get better than that. ;-)
>
> > I use #'min and #'max is because I find the docstring saying that BEG
> > and END could be a marker. I don't know if #'< or #'> can handle the
> > comparation of a marker with a integer, but #'min and #'max announced
> > they could in their docstring.
>
> So does #'<.
>
> > And beside this, I find another possiable way of get into error of
> > "args out of range". If some bad guy or buggy program set both BEG and
> > END < 1 or > (1+ (buffer-size)), boom!! I will change the code to avoid
> > this...
>
> Ah, good point. I still don't think that what are surely often logic
> errors should pass like this, but if that's the way GNU does it, the
> emulation may as well do so too.
>
> Note that it needs to be (buffer-size buffer), not just (buffer-size).
>
>
Well, here's patch with test results...
;; This buffer is for notes you don't want to save, and for Lisp evaluation.
;; If you want to create a file, first visit that file with C-x C-f,
;; then enter the text in that file's own buffer. (C-x is the standard
;; XEmacs abbreviation for `Control+x', i.e. hold down the Control key
;; while hitting the x key.)
;;
;; For Lisp evaluation, type an expression, move to the end and hit C-j.
(require 'overlay)
overlay
(overlays-in -10000 1000)
nil
(make-overlay -100 -10)
#<extent [1, 1) overlay 0x2f91658 in buffer *scratch*>
(make-overlay 1000 100000)
#<extent [561, 561) overlay 0x2f23620 in buffer *scratch*>
(overlays-at -100)
(#<extent [1, 1) overlay 0x2f91658 in buffer *scratch*>)
(overlays-at 10000)
nil
(overlays-in -10000 10000)
(#<extent [1, 1) overlay 0x2f91658 in buffer *scratch*> #<extent [561,
561) overlay 0x2f23620 in buffer *scratch*>)
-------------- next part --------------
A non-text attachment was scrubbed...
Name: overlay.patch
Type: text/x-patch
Size: 5087 bytes
Desc: not available
Url : http://calypso.tux.org/pipermail/xemacs-patches/attachments/20080301/d4582ff9/attachment-0001.bin
More information about the XEmacs-Patches
mailing list