From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: Ed Cavazos Newsgroups: gmane.emacs.devel Subject: toggle-menu-bar and toggle-tool-bar Date: 30 May 2003 05:34:30 -0500 Sender: emacs-devel-bounces+emacs-devel=quimby.gnus.org@gnu.org Message-ID: NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: main.gmane.org 1054293743 8533 80.91.224.249 (30 May 2003 11:22:23 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Fri, 30 May 2003 11:22:23 +0000 (UTC) Original-X-From: emacs-devel-bounces+emacs-devel=quimby.gnus.org@gnu.org Fri May 30 13:22:19 2003 Return-path: Original-Received: from quimby.gnus.org ([80.91.224.244]) by main.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 19LhwZ-0002AS-00 for ; Fri, 30 May 2003 13:21:07 +0200 Original-Received: from monty-python.gnu.org ([199.232.76.173]) by quimby.gnus.org with esmtp (Exim 3.12 #1 (Debian)) id 19LiBg-0003SD-00 for ; Fri, 30 May 2003 13:36:44 +0200 Original-Received: from localhost ([127.0.0.1] helo=monty-python.gnu.org) by monty-python.gnu.org with esmtp (Exim 4.20) id 19Lhvx-0002ab-Pu for emacs-devel@quimby.gnus.org; Fri, 30 May 2003 07:20:29 -0400 Original-Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.20) id 19LhoF-0000Tk-3n for emacs-devel@gnu.org; Fri, 30 May 2003 07:12:31 -0400 Original-Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.20) id 19Lhe7-0007DS-Iy for emacs-devel@gnu.org; Fri, 30 May 2003 07:02:05 -0400 Original-Received: from ms-smtp-01.texas.rr.com ([24.93.36.229]) by monty-python.gnu.org with esmtp (Exim 4.20) id 19LhDe-0003AJ-8O for emacs-devel@gnu.org; Fri, 30 May 2003 06:34:42 -0400 Original-Received: from odyssey.theworld.com (cs6668127-180.austin.rr.com [66.68.127.180])h4UAYZG8005006 for ; Fri, 30 May 2003 05:34:40 -0500 (CDT) Original-To: emacs-devel@gnu.org Original-Lines: 30 User-Agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.3 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1b5 Precedence: list List-Id: Emacs development discussions. List-Help: List-Post: List-Subscribe: , List-Archive: List-Unsubscribe: , Errors-To: emacs-devel-bounces+emacs-devel=quimby.gnus.org@gnu.org Xref: main.gmane.org gmane.emacs.devel:14477 X-Report-Spam: http://spam.gmane.org/gmane.emacs.devel:14477 What do you guys think about having toggle-menu-bar and toggle-tool-bar functions? There's already toggle-scroll-bar so it doesn't seem too far out. In my desktop environment, I have many Emacs frames opened (sometimes 20-30). My default frame settings specify no toolbar or menu. Occasionally I'd like to see the menus and toolbar offered by a mode or package, so I want to turn them on in that particular frame. Using menu-bar-mode and tool-bar-mode, all my frames grow unnecessarily. I use these functions (they depend upon a couple of other support functions I use) : (defun toggle-menu-bar () "Toggle the display of the menu bar in the current frame." (interactive) (let ((frame (selected-frame))) (let ((flag (toggle-0-or-1 (frame-parameter frame 'menu-bar-lines)))) (modify-frame-parameter frame 'menu-bar-lines flag)))) (defun toggle-tool-bar () "Toggle the display of the tool bar in the current frame." (interactive) (let ((frame (selected-frame))) (let ((flag (toggle-0-or-1 (frame-parameter frame 'tool-bar-lines)))) (modify-frame-parameter frame 'tool-bar-lines flag))))