.emacs-my
changeset 370 378a4dc8ea1c
parent 369 1dbc90e50b2d
child 371 c2aac4122192
equal deleted inserted replaced
369:1dbc90e50b2d 370:378a4dc8ea1c
    41 
    41 
    42 ;; ======================================================================
    42 ;; ======================================================================
    43 ;; appearance.
    43 ;; appearance.
    44 
    44 
    45 (setq default-directory "~/")
    45 (setq default-directory "~/")
       
    46 
       
    47 ;; To maximize frame on full screen, not work with Windows Emacs 21.4.
       
    48 ;; And maked different height with Emacs 22.3 and 23.1.
       
    49 ;; (setq initial-frame-alist '((fullscreen . fullboth)))
       
    50 
       
    51 ;; Next code work with Emacs 21.4, 22.3, 23.1.
       
    52 (when window-system
       
    53   (let (
       
    54         (px (display-pixel-width))
       
    55         (py (display-pixel-height))
       
    56         (fx (frame-char-width))
       
    57         (fy (frame-char-height))
       
    58         tx ty
       
    59         )
       
    60     ;; Next formulas discovered empiric on Windows host with default font.
       
    61     (setq tx (- (/ px fx) 6))
       
    62     (setq ty (- (/ py fy) 4))
       
    63     (setq initial-frame-alist '((top . 0) (left . 0)))
       
    64     (add-to-list 'initial-frame-alist (cons 'width tx))
       
    65     (add-to-list 'initial-frame-alist (cons 'height ty))
       
    66     ) )
    46 
    67 
    47 (menu-bar-mode -1)
    68 (menu-bar-mode -1)
    48 (tool-bar-mode -1)
    69 (tool-bar-mode -1)
    49 (tooltip-mode -1)
    70 (tooltip-mode -1)
    50 (scroll-bar-mode 1)
    71 (scroll-bar-mode 1)
  1135             (let ( (mgs-list '("Welcome to emacs, the thermonuclear editor."
  1156             (let ( (mgs-list '("Welcome to emacs, the thermonuclear editor."
  1136                                "You enter to Out Space. Emacs on."
  1157                                "You enter to Out Space. Emacs on."
  1137                                "Nice day for Emacsing!")) )
  1158                                "Nice day for Emacsing!")) )
  1138               (message (nth (random (length mgs-list)) mgs-list)))))
  1159               (message (nth (random (length mgs-list)) mgs-list)))))
  1139 
  1160 
  1140 ;; Size of emacs area and its position.
       
  1141 (when window-system
       
  1142   (run-at-time (format "%d sec" 1) nil '(lambda () (set-frame-position (selected-frame) 1 1)))
       
  1143   (when (boundp 'my-frame-width)
       
  1144     (run-at-time (format "%d sec" 2) nil '(lambda () (set-frame-width (selected-frame) my-frame-width t))) )
       
  1145   (when (boundp 'my-frame-height)
       
  1146     (run-at-time (format "%d sec" 3) nil '(lambda () (set-frame-height (selected-frame) my-frame-height t))) )
       
  1147   )
       
  1148 
       
  1149 ;; End loading...
  1161 ;; End loading...