From: Sean Whitton Date: Mon, 7 Apr 2025 02:19:58 +0000 (+0800) Subject: ; * lisp/vc/ediff-wind.el (ediff-with-live-window): Use cl-once-only X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=28ecc8933aab1b1b08e0742c734043fee6308799;p=emacs.git ; * lisp/vc/ediff-wind.el (ediff-with-live-window): Use cl-once-only (cherry picked from commit 1e100f482c5f07fc6cd55f32065c62244856bff2) --- 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)