unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Drew Adams <drew.adams@oracle.com>
To: Eli Zaretskii <eliz@gnu.org>, Lars Ingebrigtsen <larsi@gnus.org>
Cc: 43383@debbugs.gnu.org
Subject: bug#43383: 26.3; `toggle-menu-bar-mode-from-frame'
Date: Wed, 16 Sep 2020 17:09:06 +0000 (UTC)	[thread overview]
Message-ID: <e44b95f5-33f5-4305-9a61-f9127d69480a@default> (raw)
In-Reply-To: <<83ft7h7kym.fsf@gnu.org>>

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






  parent reply	other threads:[~2020-09-16 17:09 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-09-13 20:58 bug#43383: 26.3; `toggle-menu-bar-mode-from-frame' Drew Adams
2020-09-13 23:30 ` Lars Ingebrigtsen
2020-09-14  0:00   ` Drew Adams
2020-09-14 14:50   ` Eli Zaretskii
2020-09-14 14:51     ` Lars Ingebrigtsen
2020-09-16 16:19       ` Eli Zaretskii
2022-01-31 17:29         ` Lars Ingebrigtsen
     [not found]   ` <<834ko0beet.fsf@gnu.org>
     [not found]     ` <<877dsw8l81.fsf@gnus.org>
     [not found]       ` <<83ft7h7kym.fsf@gnu.org>
2020-09-16 17:09         ` Drew Adams [this message]
2020-09-14 14:42 ` Eli Zaretskii
     [not found] <<7f20fd70-b8f0-490d-a3f8-36a7554c6ccd@default>
     [not found] ` <<838sdcbes6.fsf@gnu.org>
2020-09-14 15:16   ` Drew Adams

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=e44b95f5-33f5-4305-9a61-f9127d69480a@default \
    --to=drew.adams@oracle.com \
    --cc=43383@debbugs.gnu.org \
    --cc=eliz@gnu.org \
    --cc=larsi@gnus.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).