 ;;              (local-set-key (kbd "RET") 'shm/newline-indent-proxy)))
 
 ;; Clojure mode
-(require 'clojure-mode)
-(add-hook 'clojure-mode-hook 'paredit-mode)
-(add-hook 'cider-mode-hook 'cider-turn-on-eldoc-mode)
-(add-hook 'nrepl-mode-hook 'paredit-mode)
-(require 'clojure-mode-extra-font-locking)
-(setq nrepl-log-messages t)
-(setq nrepl-hide-special-buffers t)
-(setq cider-show-error-buffer 'except-in-repl)
+(when (require 'clojure-mode nil t)
+  (add-hook 'clojure-mode-hook 'paredit-mode)
+  (add-hook 'cider-mode-hook 'cider-turn-on-eldoc-mode)
+  (add-hook 'nrepl-mode-hook 'paredit-mode))
+(when (require 'clojure-mode-extra-font-locking nil t)
+  (setq nrepl-log-messages t)
+  (setq nrepl-hide-special-buffers t)
+  (setq cider-show-error-buffer 'except-in-repl))
 
 ;; Ruby mode
-(push 'company-robe company-backends)
-(add-hook 'ruby-mode-hook 'robe-mode)
-(add-hook 'ruby-mode-hook 'eldoc-mode)
-(add-hook 'enh-ruby-mode-hook 'robe-mode)
-(add-hook 'enh-ruby-mode-hook 'eldoc-mode)
+(when (require 'robe nil t)
+  (push 'company-robe company-backends)
+  (add-hook 'ruby-mode-hook 'robe-mode)
+  (add-hook 'ruby-mode-hook 'eldoc-mode)
+  (add-hook 'enh-ruby-mode-hook 'robe-mode)
+  (add-hook 'enh-ruby-mode-hook 'eldoc-mode))
 
 ;; Octave
 (setq auto-mode-alist

(add-hook 'java-mode-hook 'semantic-mode)

;; Elm
(custom-set-variables '(elm-indent-offset 2))
(add-to-list 'company-backends 'company-elm)

 '(custom-safe-themes (quote ("52d707d93c3cd09ce0485a70b7bf52fbd7966d46144e05c2c3bcc5b70b07825f" default))))

;; Vim like word search
(when (require 'evil nil t)
  (global-set-key (kbd "C-*") 'evil-search-word-forward)
  (global-set-key (kbd "C-#") 'evil-search-word-backward))

;; Use % to match various kinds of brackets...
;; See: http://www.lifl.fr/~hodique/uploads/Perso/patches.el
