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

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

Re: maximizing window for MacOSX


From: Oleksandr Gavenko
Subject: Re: maximizing window for MacOSX
Date: Tue, 28 Feb 2012 21:01:05 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/23.3 (gnu/linux)

On 2012-02-03, ishi soichi wrote:

> I am trying to develop an Emacs Lisp program that maximizes the window.
> I found and modified the following code, which was originally for Carbon
> Emacs.

Personally I use such bunch of code:

  (when window-system
    (let (
          (px (display-pixel-width))
          (py (display-pixel-height))
          (fx (frame-char-width))
          (fy (frame-char-height))
          tx ty
          )
      ;; Next formulas discovered empiric on Windows/Linux host
      ;; with default font (7x13).
      (setq tx (- (/ px fx) 7))
      (setq ty (- (/ py fy) 4))
      (setq initial-frame-alist '((top . 2) (left . 2)))
      (add-to-list 'initial-frame-alist (cons 'width tx))
      (add-to-list 'initial-frame-alist (cons 'height ty))
      ) )

It does not fully maximise Emacs but make this close to good solution in
portable way and does not too depended on screen resolution.

-- 
Best regards!




reply via email to

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