   (interactive)
   (when (display-graphic-p)
 	(progn
-	  ;; use 120 char wide window for largeish displays
-	  ;; and smaller 80 column windows for smaller displays
-	  ;; pick whatever numbers make sense for you
-	  (if (> (x-display-pixel-width) 1280)
-		(add-to-list 'default-frame-alist (cons 'width 120))
-		(add-to-list 'default-frame-alist (cons 'width 80)))
-	  ;; for the height, subtract a couple hundred pixels
+      (add-to-list 'default-frame-alist
+                   (cons 'width (max 80 (/ (/ (x-display-pixel-width) 1.5)
+                                           (frame-char-width)))))
+;;	  (if (> (x-display-pixel-width) 1280)
+;;		(add-to-list 'default-frame-alist (cons 'width 100))
+;;		(add-to-list 'default-frame-alist (cons 'width 80)))
+    ;; for the height, subtract a couple hundred pixels
     ;; from the screen height (for panels, menubars and
     ;; whatnot), then divide by the height of a char to
     ;; get the height we want

;; elisp repositories
;;------------------
(require 'package)
;(add-to-list 'package-archives '("melpa-stable" . "https://stable.melpa.org/packages/") t)
(add-to-list 'package-archives '("melpa" . "http://melpa.org/packages/"))
(add-to-list 'package-archives '("marmalade" . "http://marmalade-repo.org/packages/"))
(when (< emacs-major-version 24)
  ;; For important compatibility libraries like cl-lib
  (add-to-list 'package-archives '("gnu" . "http://elpa.gnu.org/packages/")))

;; -------
;; AUCTeX
;; -------
;(require 'tex-site)
;(require 'tex-jp)
;(require 'font-latex)
;(setq TeX-default-mode 'japanese-latex-mode)
(setq japanese-TeX-command-default "pTeX")
(setq japanese-LaTeX-command-default "pLaTeX")
