unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
* toggle-menu-bar and toggle-tool-bar
@ 2003-05-30 10:34 Ed Cavazos
  0 siblings, 0 replies; only message in thread
From: Ed Cavazos @ 2003-05-30 10:34 UTC (permalink / raw)



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))))

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2003-05-30 10:34 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-05-30 10:34 toggle-menu-bar and toggle-tool-bar Ed Cavazos

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).