From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Joe Brenner Newsgroups: gmane.emacs.bugs Subject: bug#6037: 24.0.50; menu-bar-mode function doesn't toggle Date: Mon, 26 Apr 2010 23:38:59 -0700 Message-ID: <201004270639.o3R6cx2S051311@kzsu.stanford.edu> References: <87r5m2vf28.fsf@kzsu.stanford.edu> <201004261741.o3QHfJq8040081@kzsu.stanford.edu> NNTP-Posting-Host: lo.gmane.org X-Trace: dough.gmane.org 1272351397 3599 80.91.229.12 (27 Apr 2010 06:56:37 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Tue, 27 Apr 2010 06:56:37 +0000 (UTC) Cc: 6037@debbugs.gnu.org To: Stefan Monnier Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Tue Apr 27 08:56:36 2010 connect(): No such file or directory Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1O6eig-0001x3-Lb for geb-bug-gnu-emacs@m.gmane.org; Tue, 27 Apr 2010 08:56:34 +0200 Original-Received: from localhost ([127.0.0.1]:33082 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1O6eig-0005J3-7o for geb-bug-gnu-emacs@m.gmane.org; Tue, 27 Apr 2010 02:56:34 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1O6eiF-00057z-Ku for bug-gnu-emacs@gnu.org; Tue, 27 Apr 2010 02:56:07 -0400 Original-Received: from [140.186.70.92] (port=42752 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1O6ei4-00055R-Rf for bug-gnu-emacs@gnu.org; Tue, 27 Apr 2010 02:56:07 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1O6ehp-0000qh-NN for bug-gnu-emacs@gnu.org; Tue, 27 Apr 2010 02:55:56 -0400 Original-Received: from debbugs.gnu.org ([140.186.70.43]:42809) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1O6ehp-0000qO-Gq for bug-gnu-emacs@gnu.org; Tue, 27 Apr 2010 02:55:41 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.69) (envelope-from ) id 1O6eSg-0007uG-Og; Tue, 27 Apr 2010 02:40:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Joe Brenner Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-To: owner@debbugs.gnu.org Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 27 Apr 2010 06:40:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 6037 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 6037-submit@debbugs.gnu.org id=B6037.127235035230375 (code B ref 6037); Tue, 27 Apr 2010 06:40:02 +0000 Original-Received: (at 6037) by debbugs.gnu.org; 27 Apr 2010 06:39:12 +0000 Original-Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1O6eRr-0007ts-PF for submit@debbugs.gnu.org; Tue, 27 Apr 2010 02:39:11 -0400 Original-Received: from smtp4.stanford.edu ([171.67.219.84] helo=smtp.stanford.edu) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1O6eRp-0007tm-7E for 6037@debbugs.gnu.org; Tue, 27 Apr 2010 02:39:09 -0400 Original-Received: from smtp.stanford.edu (localhost.localdomain [127.0.0.1]) by localhost (Postfix) with SMTP id BD9E7CD55; Mon, 26 Apr 2010 23:39:05 -0700 (PDT) Original-Received: from kzsu.stanford.edu (KZSU.Stanford.EDU [171.66.118.90]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by smtp.stanford.edu (Postfix) with ESMTPS id 404D8CD05; Mon, 26 Apr 2010 23:39:05 -0700 (PDT) Original-Received: from kzsu.stanford.edu (localhost.stanford.edu [127.0.0.1]) by kzsu.stanford.edu (8.13.4/8.13.7) with ESMTP id o3R6cx2S051311; Mon, 26 Apr 2010 23:39:04 -0700 (PDT) (envelope-from doom@kzsu.stanford.edu) In-reply-to: Comments: In-reply-to Stefan Monnier message dated "Mon, 26 Apr 2010 23:05:18 -0400." X-Mailer: MH-E 8.2; nmh 1.2; GNU Emacs 24.0.50 X-Scanned-By: MIMEDefang 2.56 on 171.66.118.47 X-Greylist: Sender DNS name whitelisted, not delayed by milter-greylist-2.0.2 (kzsu.stanford.edu [127.0.0.1]); Mon, 26 Apr 2010 23:39:05 -0700 (PDT) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list Resent-Date: Tue, 27 Apr 2010 02:40:02 -0400 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3) X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:36546 Archived-At: Stefan Monnier wrote: > > 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) > > )) > > I don't know what this is meant to do, so I don't see where you need the > toggle behavior. Well the ideal is that hitting f12 should enable or disable the various gui features that I typically don't care about such as the menu-bar and so on. Admittedly, the above code is a hack in an inbetween state. Currently I have it revised like so: ;------------ ; luddite mode (tool-bar-mode -1) (menu-bar-mode -1) (scroll-bar-mode -1) (setq use-dialog-box nil) ; toggles luddite mode (global-set-key [f12] '(lambda () (interactive) (menu-bar-mode 'toggle) (scroll-bar-mode 'toggle) (doom-toggle-use-dialog-box) )) (defun doom-toggle-use-dialog-box () "Toggle the use-dialog-box setting" (interactive) (setq use-dialog-box (cond (use-dialog-box nil) (t nil) ))) > Note that in Emacs-23, when calling a minor-mode with nil (or no) > argument to turn it off, it usually outputted a warning (because > practice showed that such calls are usually erroneous). I've never noticed this with (menu-bar-mode) or (scroll-bar-mode). > > 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." > > And indeed M-x menu-bar-mode toggles, just like M-x scroll-bar-mode. > Only the non-interactive calls are affected. And indeed, that difference is (a) not documented and (b) not the way it used to behave. But hey, what do I know, I'm only a mere user, I should know better than to argue with our glorious masters. It's no doubt very silly of me to think that the code inferace for emacs might've settled down around version 23.