overlay.el bug, incompatable overlays-in

It's me FKtPp ;) m_pupil at yahoo.com.cn
Fri Feb 22 11:09:56 EST 2008


Stephen J. Turnbull wrote:
> FKtPp writes:
>
>  > It seemed that, GNU's builtin #'overlays-in (beg end) supports:
>  > 
>  > BEGin less than point-min, eg. 0
>  > END greater than point-max eg. (1+ (point-max)
>  > 
>  > But XEmacs' didn't support these, and will report "Args out of range"
>  > error.
>
> Overlays are documented to be partially compatible, unsupported, and
> deprecated.  Policy has long been that code using them should be
> converted to use extents.  I personally don't consider this a bug for
> that reason, at least not at the present time.
>
> You're welcome to fix the overlay support that's in fsf-compat, as
> an alternative to converting the code to use extents.
>   
A branch of test shows that GNU's overlays- function can accept any
integer as BIG or END parameter -_-

---------------------------------->8----------------------------------
;; This buffer is for notes you don't want to save, and for Lisp
evaluation.   
;; If you want to create a file, visit that file with C-x
C-f,                 
;; then enter the text in that file's own
buffer.                              

(make-overlay -100 400)
#<overlay from 1 to 255 in *scratch*>
(overlays-in -100 1000)
(#<overlay from 1 to 215 in *scratch*> #<overlay from 1 to 279 in
*scratch*> #<\
overlay from 1 to 317 in *scratch*> #<overlay from 254 to 255 in
*scratch*> #<o\
verlay from 276 to 277 in *scratch*>)
---------------------------------->8----------------------------------

But the resulted overlays are always in range [(point-min),(point-max)],
so it seemed that GNU's builtin

#'make-overlay <= checks beg and end, switch two parameter if end > beg
#'move-overlay <= checks beg and end, switch two parameter if end > beg
#'overlays-in  <= checks beg and end, return nil if end > beg

attachment is a changed overlay.el that with above 3 #'functions emulate
the GNU's behavior.


-------------- next part --------------
A non-text attachment was scrubbed...
Name: overlay.el
Type: text/x-emacs-lisp
Size: 9357 bytes
Desc: not available
Url : http://lists.xemacs.org/pipermail/xemacs-beta/attachments/20080223/4748ca75/overlay.bin


More information about the XEmacs-Beta mailing list