Subject: bug#6037: 24.0.50; menu-bar-mode function doesn't toggle

From: Stefan Monnier <[email-masked]>
Date: Wed, 28 Apr 2010 10:43:20 -0400

>> - 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.
> Really?  What is the connection between call-interactively and customize?

No direct connect, but minor modes defined with define-minor-mode will
check if they're called via call-interactively to decide whether to tell
customize about the change (if not called interactively, there's no way
for Customize to know whether the change could interfere with Customize
or not).

>> - 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.
> Really?  In the past I've had to bind prefix-arg to the value of
> current-prefix-arg around call-interactively, to get the "interior"
> command to inherit the prefix arg of the exterior command.

Hmm... you might be right.

>> - You'll get a minibuffer messages about the menu-bar-mode being
>> enabled/disabled.
> Why doesn't scroll-bar-mode display the same messages?

Because there's only one minibuffer, so you only see one of
the messages.
In this case it happens to be the first rather than the second.

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

> (FOO-bar-mode nil) should also toggle across those versions (and older
> versions)

No, for Emacs-24 it will not toggle.

        Stefan