From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Stefan Monnier Newsgroups: gmane.emacs.bugs Subject: bug#6037: 24.0.50; menu-bar-mode function doesn't toggle Date: Tue, 27 Apr 2010 09:42:39 -0400 Message-ID: References: <87r5m2vf28.fsf@kzsu.stanford.edu> <201004261741.o3QHfJq8040081@kzsu.stanford.edu> <201004270639.o3R6cx2S051311@kzsu.stanford.edu> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: dough.gmane.org 1272378573 9398 80.91.229.12 (27 Apr 2010 14:29:33 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Tue, 27 Apr 2010 14:29:33 +0000 (UTC) Cc: 6037@debbugs.gnu.org To: Joe Brenner Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Tue Apr 27 16:29:32 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 1O6lmy-0004tZ-39 for geb-bug-gnu-emacs@m.gmane.org; Tue, 27 Apr 2010 16:29:28 +0200 Original-Received: from localhost ([127.0.0.1]:41449 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1O6lmx-00017C-1o for geb-bug-gnu-emacs@m.gmane.org; Tue, 27 Apr 2010 10:29:27 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1O6lGP-0003ui-0T for bug-gnu-emacs@gnu.org; Tue, 27 Apr 2010 09:55:49 -0400 Original-Received: from [140.186.70.92] (port=38827 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1O6lGJ-0003rT-2E for bug-gnu-emacs@gnu.org; Tue, 27 Apr 2010 09:55:48 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1O6lGD-00089F-JG for bug-gnu-emacs@gnu.org; Tue, 27 Apr 2010 09:55:42 -0400 Original-Received: from debbugs.gnu.org ([140.186.70.43]:58452) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1O6lGD-000895-HG for bug-gnu-emacs@gnu.org; Tue, 27 Apr 2010 09:55:37 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.69) (envelope-from ) id 1O6l42-0007Ak-2l; Tue, 27 Apr 2010 09:43:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Stefan Monnier 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 13:43: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.127237576827564 (code B ref 6037); Tue, 27 Apr 2010 13:43:02 +0000 Original-Received: (at 6037) by debbugs.gnu.org; 27 Apr 2010 13:42:48 +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 1O6l3o-0007AX-5A for submit@debbugs.gnu.org; Tue, 27 Apr 2010 09:42:48 -0400 Original-Received: from ironport2-out.teksavvy.com ([206.248.154.183] helo=ironport2-out.pppoe.ca) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1O6l3l-0007AR-7E for 6037@debbugs.gnu.org; Tue, 27 Apr 2010 09:42:46 -0400 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AvsEAP6G1kvO+KoL/2dsb2JhbACcTHLAXoUOBIwPgww X-IronPort-AV: E=Sophos;i="4.52,280,1270440000"; d="scan'208";a="62676260" Original-Received: from 206-248-170-11.dsl.teksavvy.com (HELO pastel.home) ([206.248.170.11]) by ironport2-out.pppoe.ca with ESMTP; 27 Apr 2010 09:42:39 -0400 Original-Received: by pastel.home (Postfix, from userid 20848) id 9C4C37F22; Tue, 27 Apr 2010 09:42:39 -0400 (EDT) In-Reply-To: <201004270639.o3R6cx2S051311@kzsu.stanford.edu> (Joe Brenner's message of "Mon, 26 Apr 2010 23:38:59 -0700") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.50 (gnu/linux) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list Resent-Date: Tue, 27 Apr 2010 09:43: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:36562 Archived-At: > 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: > (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). Stefan