help-gnu-emacs
[Top][All Lists]
Advanced

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

Re: Frames: selectively enabling GUI [SOLVED!]


From: Joel J. Adamson
Subject: Re: Frames: selectively enabling GUI [SOLVED!]
Date: Thu, 16 Aug 2007 17:30:45 -0400
User-agent: Gnus/5.11 (Gnus v5.11) Emacs/22.1 (gnu/linux)

daniel@bigwalter.net (Daniel Jensen) writes:

> jadamson@partners.org (Joel J. Adamson) writes:
>
>>     I've been mucking about with make-variable-frame-local, but
>> the problem I'm having is controlling the modes from within a function
>> (perhaps a hook).  I just don't know where to go from
>> make-variable-frame-local --- can I even make a mode frame-local?
>
> There are frame parameters for this. See the Elisp manual and/or have a
> look at the source code for `menu-bar-mode', `toggle-scroll-bar' etc.

Here's the solution:

**********************************************************************
(defun gnus-frame-defaults ()
  (mapc 'make-variable-frame-local
         '(height width menu-bar-lines tool-bar-lines vertical-scroll-bars))
  (modify-frame-parameters '() '((height . 40)
                                 (width . 136)
                                 (menu-bar-lines . 1)
                                 (tool-bar-lines . 1)
                                 (vertical-scroll-bars . 1))))
(add-hook 'gnus-group-mode-hook 'gnus-frame-defaults)
**********************************************************************

I am writing this now in a fully-tooled, fully-scrolled and
menu-ridden frame.  My other frames are untouched.

Thanks for your help,
Joel


-- 
Joel J. Adamson
Biostatistician
Pediatric Psychopharmacology Research Unit
Massachusetts General Hospital
Boston, MA  02114
(617) 643-1432
(303) 880-3109

"It can be interesting to study ancient philosophy, but more as a kind
of accident report than to teach you anything useful."
                                        --Paul Graham
                                        http://www.paulgraham.com/raq.html


reply via email to

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