[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:
`evaporate'
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)
(save-current-buffer
(set-buffer (get-buffer-create "*bugsme*"))
(erase-buffer)
(remove-overlays)
(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))))
))
Results...
(before-evaporate (#<overlay from 2 to 2 in *bugsme*>))
(after-evaporate nil)
--
Peter Whaite (http://whaite.ca)
- Overlay evaporates when it should not,
Peter Whaite <=