* Overlay evaporates when it should not
@ 2004-07-15 22:08 Peter Whaite
2004-07-16 16:09 ` Richard Stallman
0 siblings, 1 reply; 2+ messages in thread
From: Peter Whaite @ 2004-07-15 22:08 UTC (permalink / raw)
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)
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: Overlay evaporates when it should not
2004-07-15 22:08 Overlay evaporates when it should not Peter Whaite
@ 2004-07-16 16:09 ` Richard Stallman
0 siblings, 0 replies; 2+ messages in thread
From: Richard Stallman @ 2004-07-16 16:09 UTC (permalink / raw)
Cc: emacs-devel
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.
Foverlay_put has explicit code to delete an empty overlay
if you give it a non-nil evaporate property. It has been there
for 10 years. So I'll change the manual.
Thanks.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2004-07-16 16:09 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-07-15 22:08 Overlay evaporates when it should not Peter Whaite
2004-07-16 16:09 ` Richard Stallman
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.