GNU bug report logs -
#43383
26.3; `toggle-menu-bar-mode-from-frame'
Previous Next
Reported by: Drew Adams <drew.adams <at> oracle.com>
Date: Sun, 13 Sep 2020 21:01:02 UTC
Severity: minor
Found in version 26.3
Done: Lars Ingebrigtsen <larsi <at> gnus.org>
Bug is archived. No further changes may be made.
Full log
Message #11 received at 43383 <at> debbugs.gnu.org (full text, mbox):
> > I don't understand the doc string:
> >
> > Toggle menu bar on or off, based on the status of the current frame.
> > See `menu-bar-mode' for more information.
> >
> > I have no idea what is meant by "based on the status of the current
> > frame". Is the status whether it shows the menu-bar?
> >
> > Furthermore, this seems to be used only in menu Options > Show/Hide.
> > Which means it's only visible when the menu-bar is visible, right?
>
> It's very confusing indeed, but the patch that introduces this has a
> long essay about why it was added.
>
> It's something to do with... multi-tty? Which clarifies the meaning of
> "Toggle menu bar on or off, based on the status of the current frame."
> somewhat, since the exegesis says that the (global) status may be...
> wrong?
>
> That sounds like a bug, doesn't it?
Sorry, but I still don't understand it. I don't
really care about this, so I'll leave it up to
others (e.g. you, if you want) to figure out what,
if anything, should be done about it.
I suspect that even the command name is bad.
----
FWIW, I have a similarly named command, but it does
what I'd expect a command with such a name to do:
(defun toggle-menu-bar-for-frame (&optional frame)
"Toggle showing the menu-bar for selected frame.
When called from Lisp, optional arg FRAME is used instead of the
selected frame."
(interactive)
(let ((now (or (frame-parameter frame 'menu-bar-lines) 0)))
(set-frame-parameter frame 'menu-bar-lines (if (zerop now) 1 0))))
IOW, instead of toggling all existing and future frames,
which is what `menu-bar-mode' does, it toggles only the
selected frame.
This bug report was last modified 3 years and 168 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.