[Top][All Lists]

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

Re: How to restore the layout?

From: martin rudalics
Subject: Re: How to restore the layout?
Date: Fri, 05 Jul 2013 19:03:48 +0200

>>     (let ((buffer ((get-buffer (car state)))))
>>       (if buffer
>>           (set-window-buffer window buffer)
>>         (switch-to-prev-buffer window)
> Why? In case the window cannot be deleted?

Yes.  IIRC this would otherwise show some temporary buffer instead.

>>         (setq window-state-put-stale-windows
>>               (cons window window-state-put-stale-windows))))
> AKA (push window window-state-put-stale-windows)

Better, yes.

>> and before the final call to `window--check-frame' simply add a
>> (dolist (window window-state-put-stale-windows)
>>   (when (window-deletable-p window)
>>     (delete-window window)))
> (ignore-errors (delete-window window))
> to protect only windows (i.e., when window-deletable-p returns `frame').

I forgot.  We could also delete the frame when `window-deletable-p'
returns 'frame.

> I like this.

Please fix it up and install it.


reply via email to

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