   (message "done."))
 (add-hook 'find-file-not-found-hooks 'auto-insert)
 
-;;; yasnippet
-
-(add-hook 'html-helper-timestamp-hook (function (lambda ()
-	   (insert "Last modified: " (format-time-string "%Y-%m-%d %T\n")))))
-
 ;;; C-mode
 
 (setq common-function-for-c-hook
          (lambda () 
            (local-set-key (kbd "C-; c") 'compile)
            (setq compile-command "./waf")))
-
 (add-hook 'c-mode-hook common-function-for-c-hook)
 (add-hook 'c++-mode-hook common-function-for-c-hook)
 (add-hook 'cuda-mode-hook common-function-for-c-hook)
 
-(setq load-path (cons "~/.emacs.d/plugins/yasnippet-0.6.1c" load-path))
-(require 'yasnippet)
-(yas/initialize)
-(yas/load-directory "~/.emacs.d/plugins/yasnippet-0.6.1c/snippets")
-
-;;; Platform specific configuration
-
- (cond 
-  ((string-match "apple-darwin" system-configuration)
-   (autoload 'tuareg-mode "tuareg-mode")
-   (load "~/.emacs.d/plugins/html-helper-mode/html-helper-mode")
-   (setq load-path (cons "~/.emacs.d/plugins/haskell-mode-2.8.0" load-path))
-   )
-  ((string-match "mingw" system-configuration)
-   (require 'tramp)
-   (cons "/bin/sh" tramp-remote-path)
-   (setq load-path (cons "~/.emacs.d/plugins/haskell-mode-2.8.0" load-path))
-   (load "~/.emacs.d/plugins/html-helper-mode/html-helper-mode")
-   (modify-coding-system-alist 'process "plink" 'utf-8-unix)
-   (setq tramp-default-method "plink")))
-
-;;; tramp
-(setq tramp-default-user "kkato")
-
 ;;; Haskell-mode
-;(require 'inf-haskell)
-;(setq haskell-program-name "ghci")
 (load "haskell-site-file")
 (add-hook 'haskell-mode-hook 'turn-on-haskell-doc-mode)
 (add-hook 'haskell-mode-hook 'turn-on-haskell-indent)
-;(add-hook 'haskell-mode-hook 'font-lock-mode)
-;(add-hook 'haskell-mode-hook 'imenu-add-menubar-index)
-
 (autoload 'ghc-init "ghc" nil t)
 (add-hook 'haskell-mode-hook (lambda () (ghc-init)))
-
-;;; Screen size specific configuration
-
-(setq initial-frame-alist 
-      (append '((width . 85)
-		(height . 50)) initial-frame-alist))
-;(add-hook 'after-init-hook
-;	  (lambda () (split-window-horizontally) 
-;	    (other-window 0)))
-
-
-(setq c-default-style
-      '((java-mode . "gnu") ))
-
-;;; yatex
-(setq load-path (cons "~/.emacs.d/plugins/yatex1.75" load-path))
-
-;;; aspell
-(setq-default ispell-program-name "aspell")
-
-;;; ejacs
-(setq load-path (cons "~/.emacs.d/plugins/ejacs" load-path))
-(autoload 'js-console "js-console" nil t)
-
-;;; auto-install
-;(require 'auto-install)
-;(setq auto-install-directory "~/.emacs.d/auto-install/")
-;(auto-install-update-emacswiki-package-name t)
-;(auto-install-compatibility-setup)
-
-
-;;; This was installed by package-install.el.
-;;; This provides support for the package system and
-;;; interfacing with ELPA, the package archive.
-;;; Move this code earlier if you want to reference
-;;; packages in your .emacs.
-(when
-    (load
-     (expand-file-name "~/.emacs.d/elpa/package.el"))
-  (package-initialize))

(setq auto-insert-alist 
      (append '(("\\.cpp$" . ["template.cpp" my-template])
                ("\\.h$" . ["template.h" my-template]))))

(defvar template-replacements-alists
  '(("%file%" . (lambda () (file-name-nondirectory (buffer-file-name))))
    ("%file-noext%" . 

;;; First of all...
(global-set-key (kbd "C-h") 'delete-backward-char)
(global-set-key (kbd "C-; g") 'goto-line)
(recentf-mode)
(setq visible-bell t)
(setq truncate-partial-width-windows nil)
(setq-default indent-tabs-mode nil)
(set-default-coding-systems 'utf-8)
(setq inhibit-startup-message t)

;; Packages
(require 'package)
(setq package-archives 
      (append '(("marmalade" . "http://marmalade-repo.org/packages/")
                ("melpa" . "http://melpa.milkbox.net/packages/"))
              package-archives))
(package-initialize)

;; for mozc
(require 'mozc)
(setq default-input-method "japanese-mozc")

;; color theme
(require 'color-theme)
(eval-after-load "color-theme"
  '(progn
     (color-theme-initialize)
     (color-theme-euphoria)))

;;; Screen size specific configuration
(setq initial-frame-alist 
      (append '((width . 85)
		(height . 50)) initial-frame-alist))

;;; Template
(require 'autoinsert)
