unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: "Drew Adams" <drew.adams@oracle.com>
To: "'Stefan Monnier'" <monnier@IRO.UMontreal.CA>
Cc: 12406@debbugs.gnu.org
Subject: bug#12406: 24.2.50; frame parameter `menu-bar-lines' and `menu-bar-mode'
Date: Mon, 10 Sep 2012 14:41:13 -0700	[thread overview]
Message-ID: <FAB49E1921834229B979C6FF2440C471@us.oracle.com> (raw)
In-Reply-To: <jwvd31ty5sc.fsf-monnier+emacs@gnu.org>

> The core of the problem is that menu-bar-mode is global, whereas the
> presence/absence of a menu-bar is actually a frame property (and it's
> important to me that it be so, because I have some frames with
> a menu-bar and some without).

I agree.  The frame property should override what the mode claims - as it does.

> So `menu-bar-mode' is a lie.

That was my point.  Can we fix the doc a bit to provide a slightly clearer view
- e.g., mention that the frame parameter takes precedence?

It's OK to say that the mode affects existing and future frames, but for the
future part it should probably say "unless overridden by frame parameter
`menu-bar-lines'", or some such.  That's what I meant.

> One possible fix is to make menu-bar-mode into a frame-local mode,
> so calling menu-bar-mode would only affect the
> current frame (and maybe also the future frames) but not the other
> existing frames.

To me, that would be bad - not helpful at all.  A user should be able, as now,
to set the mode and have it (1) update all existing frames and (b) affect future
frames by setting the default behavior, i.e., unless overridden.

I personally have not needed to prevent the mode change from affecting any
particular frame.  But if you did need to have some existing frame prevent the
mode change from affecting it, then we could introduce a way to specify that.
E.g., a `menu-bar-lines' value of, say, a cons (N keep).  So a value of
(menu-bar-lines 1 keep)) would keep one line and be unaffected by mode changes.

Another possibility (orthogonal) would be to let the prefix arg of
`menu-bar-mode' do double duty, to optionally affect only the current frame.
Dunno.  But I would not want that command changed to systematically affect only
the current frame.






  reply	other threads:[~2012-09-10 21:41 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-09-10 17:59 bug#12406: 24.2.50; frame parameter `menu-bar-lines' and `menu-bar-mode' Drew Adams
2012-09-10 20:39 ` Stefan Monnier
2012-09-10 21:41   ` Drew Adams [this message]
2012-09-12  8:09     ` martin rudalics
2012-09-12 14:13       ` Drew Adams
2012-09-12 15:08         ` martin rudalics
2012-09-12 15:33           ` Drew Adams
2012-09-12 16:48             ` martin rudalics
2012-09-12 17:42               ` Drew Adams
2012-09-12 17:53                 ` martin rudalics
2012-09-12 18:02                   ` Drew Adams
2012-09-13  3:17             ` Stefan Monnier
2012-09-13  4:05               ` 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=FAB49E1921834229B979C6FF2440C471@us.oracle.com \
    --to=drew.adams@oracle.com \
    --cc=12406@debbugs.gnu.org \
    --cc=monnier@IRO.UMontreal.CA \
    /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).