From b220b451362cbd36f48c83b5bbbf47ba687f88bc Mon Sep 17 00:00:00 2001 From: Michael Heerdegen Date: Wed, 5 Mar 2025 16:09:30 +0100 Subject: [PATCH] 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) --- lisp/emacs-lisp/gv.el | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) 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) -- 2.39.5