[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#39181: 27.0.50; [PATCH] Allow users to store & restore gdb-mi layout
From: |
Yuan Fu |
Subject: |
bug#39181: 27.0.50; [PATCH] Allow users to store & restore gdb-mi layout |
Date: |
Mon, 9 Mar 2020 13:59:31 -0400 |
> On Mar 9, 2020, at 5:01 AM, martin rudalics <rudalics@gmx.at> wrote:
>
> >> I'm sorry, I only skimmed through your patch, but shouldn't this use
> >> 'unwind-protect'? Otherwise the "temporarily" won't hold in case of
> >> abnormal exit from BODY, unless I'm missing something.
> >>
> >> —
> >> Štěpán
> >
> > Thanks for spotting that. I added the unwind-protext form.
>
> If we want to be more strict about this macro then how about the
> following forms:
>
> (with-selected-window-undedicated
> (set-window-dedicated-p nil t))
>
> will leave the selected window dedicated which does not really violate
> the contract of the macro but is unexpected at least.
>
> The following is more serious: Suppose a user has a >= 2 windows layout
> and does
>
> (set-window-dedicated-p nil t)
> (with-selected-window-undedicated
> (other-window 1))
>
> which will have the macro make some other window dedicated and the
> initially selected window undedicated. A similar thing happens with
>
> (set-window-dedicated-p nil t)
> (with-selected-window-undedicated
> (delete-window))
>
> The macro should be named 'with-window-undedicated', take a WINDOW (nil
> for the selected one) as first argument and BODY as second. It should
> restore the dedicated status of WINDOW to what it was before running
> BODY and leave the dedicated status of all other windows alone. IMHO.
>
> Martin
>
I updated the patch accordingly. Could you have a look at the docsting? I had a
hard time writing it.
Yuan
new-window.patch
Description: Binary data
- bug#39181: 27.0.50; [PATCH] Allow users to store & restore gdb-mi layout, Yuan Fu, 2020/03/03
- bug#39181: 27.0.50; [PATCH] Allow users to store & restore gdb-mi layout, Fu Yuan, 2020/03/04
- bug#39181: 27.0.50; [PATCH] Allow users to store & restore gdb-mi layout, Yuan Fu, 2020/03/05
- bug#39181: 27.0.50; [PATCH] Allow users to store & restore gdb-mi layout, martin rudalics, 2020/03/05
- bug#39181: 27.0.50; [PATCH] Allow users to store & restore gdb-mi layout, Yuan Fu, 2020/03/07
- bug#39181: 27.0.50; [PATCH] Allow users to store & restore gdb-mi layout, Štěpán Němec, 2020/03/07
- bug#39181: 27.0.50; [PATCH] Allow users to store & restore gdb-mi layout, Yuan Fu, 2020/03/07
- bug#39181: 27.0.50; [PATCH] Allow users to store & restore gdb-mi layout, martin rudalics, 2020/03/09
- bug#39181: 27.0.50; [PATCH] Allow users to store & restore gdb-mi layout,
Yuan Fu <=
- bug#39181: 27.0.50; [PATCH] Allow users to store & restore gdb-mi layout, Štěpán Němec, 2020/03/09
- bug#39181: 27.0.50; [PATCH] Allow users to store & restore gdb-mi layout, Yuan Fu, 2020/03/09
- bug#39181: 27.0.50; [PATCH] Allow users to store & restore gdb-mi layout, Štěpán Němec, 2020/03/09
- bug#39181: 27.0.50; [PATCH] Allow users to store & restore gdb-mi layout, martin rudalics, 2020/03/10
- bug#39181: 27.0.50; [PATCH] Allow users to store & restore gdb-mi layout, Fu Yuan, 2020/03/10
- bug#39181: 27.0.50; [PATCH] Allow users to store & restore gdb-mi layout, martin rudalics, 2020/03/11
- bug#39181: 27.0.50; [PATCH] Allow users to store & restore gdb-mi layout, Štěpán Němec, 2020/03/11
- bug#39181: 27.0.50; [PATCH] Allow users to store & restore gdb-mi layout, martin rudalics, 2020/03/12
- bug#39181: 27.0.50; [PATCH] Allow users to store & restore gdb-mi layout, Štěpán Němec, 2020/03/12
- bug#39181: 27.0.50; [PATCH] Allow users to store & restore gdb-mi layout, Yuan Fu, 2020/03/12