bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#32850: 27.0.50; window-swap-states doesn't swap window prev/next-buf


From: martin rudalics
Subject: bug#32850: 27.0.50; window-swap-states doesn't swap window prev/next-buffers
Date: Thu, 01 Nov 2018 10:03:31 +0100

> Then is this right?
>
> diff --git a/lisp/window.el b/lisp/window.el
> index bcd4fa2959..346096c2f8 100644
> --- a/lisp/window.el
> +++ b/lisp/window.el
> @@ -5898,20 +5898,12 @@ window-state-put
>   windows can get as small as `window-safe-min-height' and
>   `window-safe-min-width'."
>     (setq window-state-put-stale-windows nil)
> -  (setq window (window-normalize-window window))
>
> -  ;; When WINDOW is internal, reduce it to a live one to put STATE into,
> -  ;; see Bug#16793.
> +  ;; When WINDOW is internal or nil, create a new window.
>     (unless (window-live-p window)
> -    (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))

ugliness?

martin





reply via email to

[Prev in Thread] Current Thread [Next in Thread]