Subject: bug#40000: 27.0.60; next-single-char-property-change hangs on bad argument

From: Eli Zaretskii <[email-masked]>
Date: Mon, 13 Apr 2020 18:54:24 +0300

> From: Federico Tedin <[email-masked]>
> Cc: [email-masked],  [email-masked]
> Date: Mon, 13 Apr 2020 17:27:06 +0200
> 
> I agree that the function should always return equal or smaller than the
> last valid position. In case of buffers, fixing LIMIT > (point-max) is
> OK because the function wasn't defined for that case anyways, as you
> mentioned. However I'm not sure if my patch should fix the case for
> strings where LIMIT > (length object), since that would mean that the
> returned value would now be (length object) instead of LIMIT. And calls
> to this function with these types of values could already exist, since
> in this case the function did not hang.

Then we'd need to clearly document the behavior in each case, I guess.