-------- 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(a)yahoo.com.cn>
To: Stephen J. Turnbull <stephen(a)xemacs.org>
Stephen J. Turnbull wrote:
> 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
> 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
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.
(overlays-in -10000 1000)
(make-overlay -100 -10)
#<extent [1, 1) overlay 0x2f91658 in buffer *scratch*>
(make-overlay 1000 100000)
#<extent [561, 561) overlay 0x2f23620 in buffer *scratch*>
(#<extent [1, 1) overlay 0x2f91658 in buffer *scratch*>)
(overlays-in -10000 10000)
(#<extent [1, 1) overlay 0x2f91658 in buffer *scratch*> #<extent [561,
561) overlay 0x2f23620 in buffer *scratch*>)
XEmacs-Patches mailing list