From: "Drew Adams" <drew.adams@oracle.com>
To: "'Stefan Monnier'" <monnier@iro.umontreal.ca>,
"'Joe Brenner'" <doom@kzsu.stanford.edu>
Cc: 6037@debbugs.gnu.org
Subject: bug#6037: 24.0.50; menu-bar-mode function doesn't toggle
Date: Tue, 27 Apr 2010 08:27:06 -0700 [thread overview]
Message-ID: <578D02D39BE3447B8BBDD6C2B01E8D67@us.oracle.com> (raw)
In-Reply-To: <jwvfx2h5895.fsf-monnier+emacs@gnu.org>
> > (global-set-key [f12] '(lambda ()
> > (interactive)
> > (menu-bar-mode 'toggle)
> > (scroll-bar-mode 'toggle)
> > (doom-toggle-use-dialog-box)
> > ))
>
> That makes sense. But then I'd recommend the code below instead:
>
> > (global-set-key [f12] (lambda ()
> > (interactive)
> > (call-interactively 'menu-bar-mode)
> > (call-interactively 'scroll-bar-mode)
> > (doom-toggle-use-dialog-box)))
>
> which will have the following impact:
> - it will tell customize about those changes (so "M-x
> customize-variable
> RET menu-bar-mode" will not complain about a variable set from
> outside, and it will let you save the current state.
> - You should be able to do C-u -1 f12 to forcibly turn off
> and C-u 1 f12 to forcibly turn on those GUI elements.
> - You'll get a minibuffer messages about the menu-bar-mode being
> enabled/disabled.
> - It will work across "all" Emacs versions (the above code
> will already
> work with emacs-2[234] and I'm not sure which other versions have
> menu-bar-mode and scroll-bar-mode, so maybe it's not that big
> a difference).
This is the kind of thing that should be added to the doc. Many users will make
use of something like this in their init files. They need to be aware of pretty
much all of the things you point out.
next prev parent reply other threads:[~2010-04-27 15:27 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-04-26 7:38 bug#6037: 24.0.50; menu-bar-mode function doesn't toggle Joseph Brenner
2010-04-26 13:42 ` Stefan Monnier
2010-04-26 14:13 ` Lennart Borgman
2010-04-26 17:38 ` Stefan Monnier
2010-04-26 17:41 ` Joe Brenner
2010-04-27 3:05 ` Stefan Monnier
2010-04-27 6:38 ` Joe Brenner
2010-04-27 13:42 ` Stefan Monnier
2010-04-27 15:27 ` Drew Adams [this message]
2010-04-28 5:42 ` Kevin Rodgers
2010-04-28 14:43 ` Stefan Monnier
2011-09-21 19:37 ` Lars Magne Ingebrigtsen
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
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=578D02D39BE3447B8BBDD6C2B01E8D67@us.oracle.com \
--to=drew.adams@oracle.com \
--cc=6037@debbugs.gnu.org \
--cc=doom@kzsu.stanford.edu \
--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 external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.