[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [h-e-w] not urgent: change frame size by function
From: |
Sarir Khamsi |
Subject: |
Re: [h-e-w] not urgent: change frame size by function |
Date: |
Thu, 29 Dec 2005 08:49:53 -0700 |
User-agent: |
Gnus/5.1006 (Gnus v5.10.6) Emacs/22.0.50 (windows-nt) |
Heinz Tuechler <address@hidden> writes:
> not being an expert of Emacs, I could not find a way to change the size of
> an existing frame by a function.
> I know to set the initial size by initial-frame-alist. Is there a similar
> function to change an existing frame?
> I would like to enlage the frame, in case I run R from within Emacs. At the
> moment, I do this by creating a new frame, but may be, there is a better
> method.
I use this in my ~/.emacs:
(defun sk-grow-frame-height (&optional increment frame)
"Increase the height of FRAME (default: selected-frame) by INCREMENT.
Interactively, INCREMENT is given by the prefix argument."
(interactive "p")
(set-frame-height frame (+ (frame-height frame) increment)))
(defun sk-grow-frame-width (&optional increment frame)
"Increase the width of FRAME (default: selected-frame) by INCREMENT.
Interactively, INCREMENT is given by the prefix argument."
(interactive "p")
(set-frame-width frame (+ (frame-width frame) increment)))
(global-set-key [(control meta down)] (quote sk-grow-frame-height))
(global-set-key [(control meta up)]
(lambda () (interactive) (sk-grow-frame-height -1)))
(global-set-key [(control meta right)] (quote sk-grow-frame-width))
(global-set-key [(control meta left)]
(lambda () (interactive) (sk-grow-frame-width -1)))
Sarir