[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: how to set the default size of emacs' window?
From: |
Ke Lu |
Subject: |
Re: how to set the default size of emacs' window? |
Date: |
Fri, 21 Sep 2007 22:30:13 +0900 |
User-agent: |
Gnus/5.11 (Gnus v5.11) Emacs/22.1.50 (gnu/linux) |
Peter Dyballa <Peter_Dyballa@Web.DE> writes:
> Am 18.09.2007 um 18:19 schrieb thorne:
>
> --fullheight, -fh make the first
> frame high as the screen
> --fullscreen, -fs make first frame
> fullscreen
> --fullwidth, -fw make the first
> frame wide as the screen
>
> Is there a way to do this such that the window
> dimensions are
> maintained even after the call to `custom-set-faces'
> in my .emacs?
>
> Yes: make that face the default font for GNU Emacs. Then
> all dimensions will be computed on the basis of this
> font's properties. Or use a font a bit smaller than that
> face, so that GNU Emacs is always obscuring the whole
> screen – which also could lead to the effect that the
> echo-area/mini-buffer will lie outside the screen.
>
> --
> Greetings
>
> Pete
>
> If you're not confused, you're not paying attention.
If you are using ntemacs and want to maximize
window,the following can do it.
(when (eq system-type 'windows-nt)
(defun defun-w32-maximum-frame ()
;; Change the current frame size.
(setq w32-frame-maximum nil)
(defun w32-maximize-frame ()
"Maximize the current frame"
(w32-send-sys-command 61488)
(setq w32-frame-maximum t))
(defun w32-restore-frame ()
"Restore the current frame"
(w32-send-sys-command 61728)
(setq w32-frame-maximum nil))
(defun toggle-frame-size ()
"Toggle frame size."
(interactive)
(if w32-frame-maximum
(w32-restore-frame)
(w32-maximize-frame)))
(global-set-key [?\C-\S-z] 'toggle-frame-size)
(add-hook 'after-init-hook 'w32-maximize-frame)
)
)