From 28ecc8933aab1b1b08e0742c734043fee6308799 Mon Sep 17 00:00:00 2001 From: Sean Whitton Date: Mon, 7 Apr 2025 10:19:58 +0800 Subject: [PATCH] ; * lisp/vc/ediff-wind.el (ediff-with-live-window): Use cl-once-only (cherry picked from commit 1e100f482c5f07fc6cd55f32065c62244856bff2) --- lisp/vc/ediff-wind.el | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/lisp/vc/ediff-wind.el b/lisp/vc/ediff-wind.el index aefa17de2c6..076c742ef58 100644 --- a/lisp/vc/ediff-wind.el +++ b/lisp/vc/ediff-wind.el @@ -257,11 +257,10 @@ keyboard input to go into icons." If WINDOW is not live (or not a window) do nothing and don't evaluate BODY, instead returning nil." (declare (indent 1) (debug (form body))) - (let ((w (gensym "window"))) - `(let ((,w ,window)) - (when (window-live-p ,w) - (with-selected-window ,w - ,@body))))) + (cl-once-only (window) + `(when (window-live-p ,window) + (with-selected-window ,window + ,@body)))) (defun ediff-get-window-by-clicking (_wind _prev-wind wind-number) (let (event) -- 2.39.5