From: Michael Heerdegen Date: Wed, 5 Mar 2025 15:09:30 +0000 (+0100) Subject: Fix overlay-start and overlay-end gv setters X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=b220b451362cbd36f48c83b5bbbf47ba687f88bc;p=emacs.git Fix overlay-start and overlay-end gv setters This fixes Bug#76730. * lisp/emacs-lisp/gv.el (overlay-start, overlay-end): Avoid computing the set value twice. (cherry picked from commit 0c8d30045bd92a908c0cf2067615fc1b2fbcc33d) --- diff --git a/lisp/emacs-lisp/gv.el b/lisp/emacs-lisp/gv.el index bf3ced9eb4a..a12fd166644 100644 --- a/lisp/emacs-lisp/gv.el +++ b/lisp/emacs-lisp/gv.el @@ -400,9 +400,11 @@ See also `incf'." (gv-define-simple-setter match-data set-match-data 'fix) (gv-define-simple-setter overlay-get overlay-put) (gv-define-setter overlay-start (store ov) - `(progn (move-overlay ,ov ,store (overlay-end ,ov)) ,store)) + (macroexp-let2 nil store store + `(progn (move-overlay ,ov ,store (overlay-end ,ov)) ,store))) (gv-define-setter overlay-end (store ov) - `(progn (move-overlay ,ov (overlay-start ,ov) ,store) ,store)) + (macroexp-let2 nil store store + `(progn (move-overlay ,ov (overlay-start ,ov) ,store) ,store))) (gv-define-simple-setter process-buffer set-process-buffer) (gv-define-simple-setter process-filter set-process-filter) (gv-define-simple-setter process-sentinel set-process-sentinel)