bug-gnu-emacs
[Top][All Lists]
Advanced

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

bug#9642: move-overlay creates an empty overlay with the evaporate prope


From: Paul Eggert
Subject: bug#9642: move-overlay creates an empty overlay with the evaporate property
Date: Sun, 02 Oct 2011 18:09:43 -0700
User-agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.2.23) Gecko/20110922 Thunderbird/3.1.15

On 10/01/11 23:56, Eli Zaretskii wrote:
> I say we should fix any code that "traditionally" relies on any such
> behavior, and stop heeding to requests of fixing undefined behavior.

This sounds like a more-general issue, that affects many
aspects of Emacs other than just this bug report, so I'll
raise this on emacs-devel.

But regardless of the more-general issue,
the behavior of move-overlay is not undefined in this case.
The Elisp documentation states that for overlays with the
evaporate property, "If this property is non-nil, the overlay
is deleted automatically if it becomes empty (i.e., if its
length becomes zero)."  This is a general statement about
overlays, and it constrains the behavior of all Emacs built-ins.

The documented constraint does not require move-overlay to raise
an exception for out-of-range values, or to silently substitute
an in-range value.  All it says is that whenever move-overlay
causes an overlay to become entry, it must delete the overlay.
Since make-overlay does not do that, there is a bug in Emacs:
either in the code, or in the documentation, or both.




reply via email to

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