; * lisp/vc/ediff-wind.el (ediff-with-live-window): Use cl-once-only

This commit is contained in:
Sean Whitton 2025-04-07 10:19:58 +08:00
parent 3ccd25f6b0
commit 1e100f482c

View 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)