Skip to content

Instantly share code, notes, and snippets.

@yoshiori
Created September 24, 2010 07:12
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save yoshiori/594975 to your computer and use it in GitHub Desktop.
Save yoshiori/594975 to your computer and use it in GitHub Desktop.
;; -*- Mode: Emacs-Lisp ; Coding: utf-8 -*-
;; OSを判別 http://coderepos.org/share/browser/dotfiles/emacs/kentaro/.emacs
(defvar run-unix
(or (equal system-type 'gnu/linux)
(or (equal system-type 'usg-unix-v)
(or (equal system-type 'berkeley-unix)
(equal system-type 'cygwin)))))
(defvar run-linux
(equal system-type 'gnu/linux))
(defvar run-system-v
(equal system-type 'usg-unix-v))
(defvar run-bsd
(equal system-type 'berkeley-unix))
(defvar run-cygwin ;; cygwinもunixグループにしておく
(equal system-type 'cygwin))
(defvar run-w32
(and (null run-unix)
(or (equal system-type 'windows-nt)
(equal system-type 'ms-dos))))
(defvar run-darwin (equal system-type 'darwin))
;;; インストール環境を整備する
;;; リスト1●init.elを作成
;; load-path を追加する関数を定義
(defun add-to-load-path (&rest paths)
(let (path)
(dolist (path paths paths)
(let ((default-directory (expand-file-name (concat user-emacs-directory path))))
(add-to-list 'load-path default-directory)
(if (fboundp 'normal-top-level-add-subdirs-to-load-path)
(normal-top-level-add-subdirs-to-load-path))))))
;; elispとconfディレクトリをサブディレクトリごとload-pathに追加
(add-to-load-path "elisp" "conf")
;; linux用設定を読み込む
(when run-unix
(load "init-unix"))
;; Mac用設定を読み込む
(when run-darwin
(load "init-mac"))
(load "init-global")
(load "init-skk")
(load "init-auto-install")
(load "init-auto-byte-compile")
(load "init-color-theme")
(load "init-font")
(load "init-anything")
(load "init-python")
(load "init-auto-complete")
(load "init-gist")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment