all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Joe Brenner <doom@kzsu.stanford.edu>
To: Stefan Monnier <monnier@iro.umontreal.ca>
Cc: 6037@debbugs.gnu.org
Subject: bug#6037: 24.0.50; menu-bar-mode function doesn't toggle
Date: Mon, 26 Apr 2010 10:41:19 -0700	[thread overview]
Message-ID: <201004261741.o3QHfJq8040081@kzsu.stanford.edu> (raw)
In-Reply-To: <jwveii2qqnp.fsf-monnier+emacs@gnu.org>


Stefan Monnier <monnier@iro.umontreal.ca> wrote:

> > The menu-bar-mode function is not working as a toggle.
>
> See etc/NEWS.

So I gather you're referring to this:

  * Incompatible Lisp Changes in Emacs 24.1

  ** Test for special mode-class was moved from view-file to view-buffer.

  ** Passing a nil argument to a minor mode function now turns the mode
   ON unconditionally.

You're of the opinion that using "nil" to turn on a minor-mode is actually
correct behavior?

And the important justification for breaking long-standing behavior
was... ?

> If you really want to toggle (I've never seen such a case from Elisp),
> just do (menu-bar-mode 'toggle).

Okay, thanks for the hint.  Is that documented anywhere?

If you'd like a use-case in elisp, I've been doing this in some form
of or another for quite some time:

  ;------------
  ; luddite mode
  (tool-bar-mode -1)
  (global-set-key [f12] '(lambda ()
                           (interactive)
                           (menu-bar-mode -1)
                           (scroll-bar-mode)
                           (setq use-dialog-box nil)
                           ))

> > Note that running scroll-bar-mode repeatedly does work as a toggle, as
> > expected for menu-bar-mode:
> >   (scroll-bar-mode)
>
> Yes, that's a bug that I hope to fix before Emacs-24.
> I.e. better not rely on it.

Allow me to quote the documentation for menu-bar-mode:

  "Toggle display of a menu bar on each frame."

And again for scroll-bar-mode:

  "Toggle display of vertical scroll bars on all frames."







  parent reply	other threads:[~2010-04-26 17:41 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 [this message]
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
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=201004261741.o3QHfJq8040081@kzsu.stanford.edu \
    --to=doom@kzsu.stanford.edu \
    --cc=6037@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 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.