         (package-install package)
       (progn
         (package-refresh-contents)
-        (require-package package min-version t)))))
+        (dcn/require-package package min-version t)))))
 
 (package-initialize)
 
 ;; Load solarized theme
-(require-package 'color-theme-solarized)
+(dcn/require-package 'color-theme-solarized)
 (load-theme 'solarized-dark t)
 
 ;; Remove splash screen

(global-set-key "\C-cb" 'org-iswitchb)
(setq org-log-done t)

(setq org-capture-templates
      '(("t" "Todo" entry (file+headline "~/Dropbox/org/todo.org" "Tasks")
         "* TODO %?\n%i\nAdded on %U")
        ("l" "Todo with link" entry (file+headline "~/Dropbox/org/todo.org" "Tasks")
         "* TODO %?\n%i\n%a\nAdded on %U")
        ("j" "Journal" entry (file+datetree "~/Dropbox/org/journal.org")
         "* %?\n%i\nEntered on %U")))
(find-file "~/Dropbox/org/todo.org")

;; Require flycheck
;;(require-package 'flycheck)
;;(add-hook 'after-init-hood #'global-flycheck-mode)

;; Lisp settings
(setq lisp-body-indent 4)

;; Coffeescript settings
(require-package 'coffee-mode)
(custom-set-variables '(coffee-tab-width 4))
(column-number-mode 1)

;; Autocomplete
(dcn/require-package 'auto-complete)
(require 'auto-complete)
(global-auto-complete-mode t)
(ac-linum-workaround)
(add-to-list 'ac-modes 'python-mode)
(add-to-list 'ac-modes 'coffee-mode)
(add-to-list 'ac-modes 'emacs-lisp-mode)
;; (defun auto-complete-mode-maybe ()
;;     "Use AC everywhere but in minibuffer"
;;     (unless (minibufferp (current-buffer))
;;         (auto-complete-mode 1)))

;; Org mode setup
(global-set-key "\C-cl" 'org-store-link)
