                                         ; if we cannot require it, it does not exist, yet. So install it.
       (error (package-install package))))
 (package-initialize)
-(package-refresh-contents)
+(unless (file-exists-p "~/.emacs.d/elpa/archives/melpa")
+(package-refresh-contents))
 
 ;; define custom lisp directory and load all subdirectories too
 (let ((default-directory "~/.emacs.d/site-lisp/"))

;; (autoload 'python-mode "python-mode" "Python editing mode." t)
;; ;; jedi completion
;; (add-hook 'python-mode-hook 'jedi:setup)
(elpy-enable)
(elpy-use-ipython)

;; Sometimes you have to
(require 'php-mode)


  (with-current-buffer
      (url-retrieve-synchronously
       "https://raw.github.com/dimitri/el-get/master/el-get-install.el")
    (let (el-get-master-branch)
    (goto-char (point-max))
    (eval-print-last-sexp))))
(el-get 'sync)

;; Make sure a package is installed
(defun package-require (package)
    "Install a PACKAGE unless it is already installed 
