GNU bug report logs - #43383
26.3; `toggle-menu-bar-mode-from-frame'

Previous Next

Package: emacs;

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 #29 received at 43383 <at> debbugs.gnu.org (full text, mbox):

From: Drew Adams <drew.adams <at> oracle.com>
To: Eli Zaretskii <eliz <at> gnu.org>, Lars Ingebrigtsen <larsi <at> gnus.org>
Cc: 43383 <at> debbugs.gnu.org, drew.adams <at> oracle.com
Subject: RE: bug#43383: 26.3; `toggle-menu-bar-mode-from-frame'
Date: Wed, 16 Sep 2020 17:09:06 +0000 (UTC)
> > > I think this command indeed has a bug, in that it cannot disable the
> > > menu bar only on the frame from which it is invoked.  It _can_ enable
> > > the menu bar on a single frame, see my response to Drew.  So I think
> > > this command needs to be improved.  But that's another issue; the doc
> > > string definitely needs to be improved.  Will you do that, or should
> > > I?
> >
> > Please go ahead.
> 
> Done.
> 
> I'm not closing the bug, because I think we should make the command
> work according to documentation: toggle the menu bar only on the frame
> from which the command is invoked.  I think it should manipulate the
> menu-bar-lines frame parameter instead of invoking menu-bar mode.
> 
> Patches welcome.

Isn't that what the code I sent does?  Here it is again:

(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))))





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.