[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#6037: 24.0.50; menu-bar-mode function doesn't toggle
From: |
Drew Adams |
Subject: |
bug#6037: 24.0.50; menu-bar-mode function doesn't toggle |
Date: |
Tue, 27 Apr 2010 08:27:06 -0700 |
> > (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.
- bug#6037: 24.0.50; menu-bar-mode function doesn't toggle, Joseph Brenner, 2010/04/26
- bug#6037: 24.0.50; menu-bar-mode function doesn't toggle, Stefan Monnier, 2010/04/26
- bug#6037: 24.0.50; menu-bar-mode function doesn't toggle, Lennart Borgman, 2010/04/26
- bug#6037: 24.0.50; menu-bar-mode function doesn't toggle, Joe Brenner, 2010/04/26
- bug#6037: 24.0.50; menu-bar-mode function doesn't toggle, Stefan Monnier, 2010/04/26
- bug#6037: 24.0.50; menu-bar-mode function doesn't toggle, Joe Brenner, 2010/04/27
- bug#6037: 24.0.50; menu-bar-mode function doesn't toggle, Stefan Monnier, 2010/04/27
- bug#6037: 24.0.50; menu-bar-mode function doesn't toggle,
Drew Adams <=
- bug#6037: 24.0.50; menu-bar-mode function doesn't toggle, Kevin Rodgers, 2010/04/28
- bug#6037: 24.0.50; menu-bar-mode function doesn't toggle, Stefan Monnier, 2010/04/28