You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

51 lines
1.4 KiB

  1. ;; Set enironment information
  2. (setq user-full-name "Drew Short")
  3. (setq user-email-address "warrick@sothr.com")
  4. ;; Load common lisp
  5. (require 'cl)
  6. ;; Package management
  7. (load "package")
  8. (package-initialize)
  9. (defvar sothr/packages '(auto-complete
  10. cyberpunk-theme
  11. gist
  12. magit
  13. markdown-mode
  14. projectile
  15. yaml-mode)
  16. "Default packages")
  17. ;; Repositories
  18. (add-to-list 'package-archives
  19. '("melpa" . "http://melpa.milkbox.net/packages/") t)
  20. (setq package-archive-enable-alist '(("melpa" deft magit)))
  21. ;; Advice from the melpa site for a package dependency validation error in emacs 24
  22. ;;(defadvice package-compute-transaction
  23. ;; (before package-compute-transaction-reverse (package-list requirements) activate compile)
  24. ;; "reverse the requirements"
  25. ;; (setq requirements (reverse requirements))
  26. ;; (print requirements))
  27. ;; Make sure default packages are installed
  28. (defun sothr/packages-installed-p ()
  29. (loop for pkg in sothr/packages
  30. when (not (package-installed-p pkg)) do (return nil)
  31. finally (return t)))
  32. ;; This is the logic that runs the above function
  33. (unless (sothr/packages-installed-p)
  34. (message "%s" "Refreshing package database...")
  35. (package-refresh-contents)
  36. (dolist (pkg sothr/packages)
  37. (when (not (package-installed-p pkg))
  38. (package-install pkg))))
  39. ;; Default configuration for auto-complete
  40. (ac-config-default)
  41. ;; Load my default theme
  42. (load-theme 'cyberpunk t)