          (add-hook 'ruby-mode-hook 'flymake-ruby-load))
 
        (let ((rhome (expand-file-name "~/.settings/src/rsense-0.3")))
-         (when (file-directory-p rhome)
-           (setq rsense-home rhome)
-           (add-to-list 'load-path (concat rsense-home "/etc"))
-           (message "try to load rsense")
-           (when (require 'rsense nil t)
-             (message "done (rsense)")
-             (add-hook 'ruby-mode-hook
-                       (lambda ()
-                         (add-to-list 'ac-sources 'ac-source-rsense-method)
-                         (add-to-list 'ac-sources 'ac-source-rsense-constant))))))
-       (message "load ruby-mode")
+         (if (file-directory-p rhome)
+             (let nil
+               (message "try to load rsense")
+               (setq rsense-home rhome)
+               (add-to-list 'load-path (concat rsense-home "/etc"))
+               (when (require 'rsense nil t)
+                 (message "done (rsense)")
+                 (add-hook 'ruby-mode-hook
+                           (lambda ()
+                             (add-to-list 'ac-sources 'ac-source-rsense-method)
+                             (add-to-list 'ac-sources 'ac-source-rsense-constant)))))
+           (message "cant not load rsense")))
        ))
   )
 

;; インストール済みでアップデート可能なパッケージをリストアップ
(defun kui/package-update-available-package-list ()
  "Return package list which have updates."
  (remove-if (lambda (pname) (not (kui/package-update-available-p pname)))
             package-activated-list))


;; -------------------------------------------------------------------------
;; メジャーモードの設定や読み込み

;; lisp-interaction-mode の設定
(let nil
  (add-hook 'lisp-interaction-mode
            (lambda nil
              (define-key lisp-interaction-mode-map "\C-cff" 'find-function)
              (define-key lisp-interaction-mode-map "\C-cfv" 'find-variable)
              (define-key lisp-interaction-mode-map "\C-cfl" 'find-library)
              (define-key lisp-interaction-mode-map "\C-cdf" 'describe-function)
              (define-key lisp-interaction-mode-map "\C-cdf" 'describe-variable)
              ))
  )

;; markdown-mode
;; 読み込めたら *scratch* に使うから kui/autoload-if-exist じゃなくて require
(when (kui/package-require 'markdown-mode nil nil t)
