]> git.eshelyaron.com Git - emacs.git/commitdiff
; * lisp/vc/ediff-wind.el (ediff-with-live-window): Use cl-once-only
authorSean Whitton <spwhitton@spwhitton.name>
Mon, 7 Apr 2025 02:19:58 +0000 (10:19 +0800)
committerEshel Yaron <me@eshelyaron.com>
Tue, 8 Apr 2025 05:46:59 +0000 (07:46 +0200)
(cherry picked from commit 1e100f482c5f07fc6cd55f32065c62244856bff2)

lisp/vc/ediff-wind.el

index aefa17de2c6bcf51fad0ab4313c2cb4823d7b703..076c742ef58ac6c0db7a82e6c28c10aac6364a54 100644 (file)
@@ -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)