emacs-devel
[Top][All Lists]
Advanced

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

Re: Terminal matrices


From: Gerd Möllmann
Subject: Re: Terminal matrices
Date: Fri, 24 Jan 2025 20:12:48 +0100
User-agent: Gnus/5.13 (Gnus v5.13)

martin rudalics <rudalics@gmx.at> writes:

>> Works with current master on macOS for me, with and without your patch.
>> Should I look for something specific not working?
>
> Let's say: What happens when you invoke info in a child frame and try to
> use the Info menu bar entry from the global menu bar.  Does it work as
> intended?

Ah, I think I see what you mean. Info adds a menu when in the root
frame, and that menu is missing when doing M-x info in the child.

>
>> Looking forward to your patch appearing on master! Thanks!
>
> It has grown for two reasons: First I had to include the prior patch for
> adding the appropriate menu bar items for the child frame when it is
> selected.  Try as above: Do C-l followed by M-x info.  This should
> change the menu bar to include Info.  Switch to the parent frame.  This
> should remove the entry.  Switch back to the child frame and try to
> select some submenu Menu Item from the Info menu bar item.  Does it work
> as intended?
>
> And I had to refine the various checks so that the special behavior is
> only for tty child frames that have no menu bar with a root frame that
> has a menu bar and everything with 'tty-menu-open-use-tmm' nil.
>
> martin

Works well for me, congrats to you this time 'round :-)

But I get a warning from clang here:

xdisp.c:21117:16: warning: variable 'redisplay_menu_p' is used uninitialized 
whenever 'if' condition is true [-Wsometimes-uninitialized]
 21117 |       else if (FRAME_PARENT_FRAME (f)
       |                ^~~~~~~~~~~~~~~~~~~~~~
 21118 |                && FRAME_MENU_BAR_LINES (f) == 0
       |                ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 21119 |                && FRAME_MENU_BAR_LINES (rf = root_frame (f)) != 0
       |                ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 21120 |                && NILP (Fdefault_value (Qtty_menu_open_use_tmm)))
       |                ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
xdisp.c:21128:11: note: uninitialized use occurs here
 21128 |       if (redisplay_menu_p)
       |           ^~~~~~~~~~~~~~~~
xdisp.c:21117:12: note: remove the 'if' if its condition is always false
 21117 |       else if (FRAME_PARENT_FRAME (f)
       |            ^~~~~~~~~~~~~~~~~~~~~~~~~~
 21118 |                && FRAME_MENU_BAR_LINES (f) == 0
       |                ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 21119 |                && FRAME_MENU_BAR_LINES (rf = root_frame (f)) != 0
       |                ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 21120 |                && NILP (Fdefault_value (Qtty_menu_open_use_tmm)))
       |                ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 21121 |         /* If F is a tty child frame without menu bar, that frame's 
root
       |         
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 21122 |            frame has a menu bar and 'tty-menu-open-use-tmm' is nil,
       |            ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 21123 |            display the menu bar of the root frame's selected window.  
*/
       |            
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 21124 |         display_menu_bar (XWINDOW (FRAME_SELECTED_WINDOW (rf)));
       |         ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 21125 |       else
       |       ~~~~
 21126 |         redisplay_menu_p = FRAME_MENU_BAR_LINES (f) > 0;
xdisp.c:21106:28: note: initialize the variable 'redisplay_menu_p' to silence 
this warning
 21106 |       bool redisplay_menu_p;
       |                            ^
       |                             = false
1 warning generated.



reply via email to

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