[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Proposing changes to adjust_frame_size
From: |
martin rudalics |
Subject: |
Re: Proposing changes to adjust_frame_size |
Date: |
Mon, 17 May 2021 09:33:15 +0200 |
>> At least the scroll bar mis-appearance has a simple explanation. Try
>> with
>>
>> (setq default-frame-alist '((width . 90)
>> (height . 50)))
>> (tool-bar-mode -1)
>> (menu-bar-mode -1)
>> (when (fboundp 'scroll-bar-mode)
>> (scroll-bar-mode -1))
>> (when (fboundp 'horizontal-scroll-bar-mode)
>> (horizontal-scroll-bar-mode -1))
>
> Yes, with this order of settings the new frame after C-x 5 2 has no
> scrollbar as it should. I don't see a self-evident reason that I need
> to set default-frame-alist before deactivating bars in my ~/.emacs, so I
> guess you need to state that simple explanation explicitly.
Here we go: To fulfill its "This command applies to all frames that
exist and frames to be created in the future" obligation and because
`scroll-bar-mode-explicit' is by default t, `set-scroll-bar-mode' adds a
(vertical-scroll-bars) element to your `default-frame-alist' which,
however, gets annihilated by your later
(setq default-frame-alist '((width . 90)
(height . 50)))
so Emacs will use the default value (here 'right') when deciding whether
to put a scroll bar on your new frame and where.
If, however, you move the `default-frame-alist' setting in front of the
`scroll-bar-mode' toggling, the (vertical-scroll-bars) entry persists.
The situation with the menu bar is different because toggling
`menu-bar-mode' changes `default-frame-alist' only if the latter already
contains a `menu-bar-lines' entry. In Fx_create_frame you can find
gui_default_parameter (f, parms, Qmenu_bar_lines,
make_fixnum (NILP (Vmenu_bar_mode) ? 0 : 1),
NULL, NULL, RES_TYPE_NUMBER);
which makes a menu bar appear (or not appear) on a new frame respecting
the current value of `menu-bar-mode'.
So while the scroll bar behavior you reported is expected and can be
observed here too, the phenomenon of the vanishing menu bar is something
I can neither observe nor explain.
martin
- Re: Proposing changes to adjust_frame_size, (continued)
- Re: Proposing changes to adjust_frame_size, martin rudalics, 2021/05/12
- Re: Proposing changes to adjust_frame_size, Tassilo Horn, 2021/05/12
- Re: Proposing changes to adjust_frame_size, martin rudalics, 2021/05/13
- Re: Proposing changes to adjust_frame_size, Tassilo Horn, 2021/05/13
- Re: Proposing changes to adjust_frame_size, martin rudalics, 2021/05/16
- Re: Proposing changes to adjust_frame_size, Tassilo Horn, 2021/05/16
- Re: Proposing changes to adjust_frame_size, martin rudalics, 2021/05/16
- Re: Proposing changes to adjust_frame_size, Tassilo Horn, 2021/05/16
- Re: Proposing changes to adjust_frame_size, martin rudalics, 2021/05/16
- Re: Proposing changes to adjust_frame_size, Tassilo Horn, 2021/05/16
- Re: Proposing changes to adjust_frame_size,
martin rudalics <=
- Re: Proposing changes to adjust_frame_size, Yuuki Harano, 2021/05/06
- Re: Proposing changes to adjust_frame_size, Yuuki Harano, 2021/05/09
- Re: Proposing changes to adjust_frame_size, martin rudalics, 2021/05/09
- Re: Proposing changes to adjust_frame_size, Yuuki Harano, 2021/05/09
- Re: Proposing changes to adjust_frame_size, martin rudalics, 2021/05/10
- Re: Proposing changes to adjust_frame_size, Yuuki Harano, 2021/05/10
- Re: Proposing changes to adjust_frame_size, martin rudalics, 2021/05/10
- Re: Proposing changes to adjust_frame_size, Yuuki Harano, 2021/05/10
- Re: Proposing changes to adjust_frame_size, martin rudalics, 2021/05/10
- Re: Proposing changes to adjust_frame_size, Yuuki Harano, 2021/05/11