From: git@toki.la Date: Fri, 11 Jul 2025 19:34:35 +0000 (-0700) Subject: Fix for 'windmove-do-window-select' if other-window is 'no-select X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=0035565a390e0f0ad30fa6476ef67e2477cf533d;p=emacs.git Fix for 'windmove-do-window-select' if other-window is 'no-select If the variable 'windmove-create-window' is set to a function that returns 'no-select', 'windmove-do-window-select' is intended to ignore the final window selection. However, because 'other-window' is passed to 'window-minibuffer-p' before checking if 'other-window' is 'no-select', 'window-minibuffer-p' will instead throw a type error, and the '(eq other-window 'no-select)' case will never be reached. This patch moves this case up a line to avoid this. * lisp/windmove.el (windmove-do-window-select): Check for 'no-select' value earlier. (Bug#78997) Copyright-paperwork-exempt: yes (cherry picked from commit 256dfdf11f40d94a86490d1b68bb86935e2d3f03) --- diff --git a/lisp/windmove.el b/lisp/windmove.el index 6e670e6c0aa..08782332131 100644 --- a/lisp/windmove.el +++ b/lisp/windmove.el @@ -357,10 +357,10 @@ in direction DIR instead." (split-window window nil dir)))) (cond ((null other-window) (user-error "No window %s from selected window" dir)) + ((eq other-window 'no-select)) ((and (window-minibuffer-p other-window) (not (minibuffer-window-active-p other-window))) (user-error "Minibuffer is inactive")) - ((eq other-window 'no-select)) (t (select-window other-window)))))