|
From: | Juri Linkov |
Subject: | bug#32850: 27.0.50; window-swap-states doesn't swap window prev/next-buffers |
Date: | Fri, 02 Nov 2018 00:30:54 +0200 |
User-agent: | Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (x86_64-pc-linux-gnu) |
>> - (let ((root window)) >> - (setq window (catch 'live >> - (walk-window-subtree >> - (lambda (window) >> - (when (and (window-live-p window) >> - (not (window-parameter window >> 'window-side))) >> - (throw 'live window))) >> - root))) >> - (delete-other-windows-internal window root))) >> + (delete-other-windows-internal) >> + (setq window (split-window)) >> + (delete-window)) >> >> (set-window-dedicated-p window nil) > > What would be bad about leaving most of that code in place and just > adding the > >> + (setq window (split-window)) >> + (delete-window)) There is no need to find a window using walk-window-subtree when this window will be deleted anyway (if function argument is nil or not a live window). OTOH, a live window should not be deleted when given by the argument of window-state-put.
[Prev in Thread] | Current Thread | [Next in Thread] |