Subject: Re: bug#76730: 29.3; gv-define-setter defect

From: Michael Heerdegen <[email-masked]>
Date: Wed, 05 Mar 2025 14:55:34 +0100

Devon Sean McCullough <[email-masked]> writes:

> (gv-define-setter overlay-end (store ov)
>   `(progn (move-overlay ,ov (overlay-start ,ov) ,store) ,store))
>
> the expansion correctly evaluates OV only once,
> yet incorrectly evaluates STORE twice!
> Too clever for its own good?

It's plain wrong.  The worst thing here is that the return value is
incorrect, it is 1 too low:

  (decf (overlay-end (make-overlay 1 2))) --> 0  ; should be 1

Michael.