[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

toggle-menu-bar and toggle-tool-bar

From: Ed Cavazos
Subject: toggle-menu-bar and toggle-tool-bar
Date: 30 May 2003 05:34:30 -0500
User-agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.3

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

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."
  (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."
  (let ((frame (selected-frame)))
    (let ((flag (toggle-0-or-1
                 (frame-parameter frame 'tool-bar-lines))))
      (modify-frame-parameter frame 'tool-bar-lines flag))))

reply via email to

[Prev in Thread] Current Thread [Next in Thread]