Use modern way to maximize frame.
--- a/.emacs-my Fri Dec 19 01:50:42 2014 +0200
+++ b/.emacs-my Fri Dec 19 02:22:22 2014 +0200
@@ -234,8 +234,8 @@
(setq display-buffer-reuse-frames t)
-;; Next code work with Emacs 21.4, 22.3, 23.1.
-(when window-system
+(defun my-maximize ()
+ ;; Next code work with Emacs 21.4, 22.3, 23.1.
(let (
(px (display-pixel-width))
(py (display-pixel-height))
@@ -248,8 +248,12 @@
(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))
- ) )
+ (add-to-list 'initial-frame-alist (cons 'height ty)) ))
+
+(when window-system
+ (if (fboundp 'toggle-frame-maximized)
+ (toggle-frame-maximized)
+ (my-maximize) ))
(menu-bar-mode -1)
(when window-system