[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Overlay evaporates when it should not

From: Peter Whaite
Subject: Overlay evaporates when it should not
Date: Thu, 15 Jul 2004 18:08:45 -0400

The Elisp manual says of the overlay evaporate property:

     If this property is non-`nil', the overlay is deleted automatically
     if it becomes empty (i.e., if its length becomes zero).  However,
     if the overlay is _already_ empty, `evaporate' does not delete it.

I find that it _does_ get deleted if the overlay is already empty...

(let (ov1)
    (set-buffer (get-buffer-create "*bugsme*"))

    (insert "123456789")
    (setq ov1 (make-overlay 2 2)) ; Has zero length
    (print (list 'before-evaporate (overlays-in (point-min) (point-max) )))
    (overlay-put ov1 'evaporate t)
    (print (list 'after-evaporate (overlays-in (point-min) (point-max))))


(before-evaporate (#<overlay from 2 to 2 in *bugsme*>))

(after-evaporate nil)

Peter Whaite (http://whaite.ca)

reply via email to

[Prev in Thread] Current Thread [Next in Thread]