Emacs config utilizing prelude as a base
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.

59 lines
2.6 KiB

  1. (add-to-list 'load-path (concat prelude-dir "el-get/el-get"))
  2. (setq el-get-dir (concat prelude-dir "el-get/"))
  3. (unless (require 'el-get nil t)
  4. (with-current-buffer
  5. (url-retrieve-synchronously
  6. "https://raw.github.com/dimitri/el-get/master/el-get-install.el")
  7. (end-of-buffer)
  8. (eval-print-last-sexp)))
  9. (setq el-get-sources
  10. '((:name magit
  11. :after (lambda ()
  12. (global-set-key (kbd "C-x g") 'magit-status)))
  13. (:name yasnippet
  14. :website "http://code.google.com/p/yasnippet/"
  15. :description "YASnippet is a template system for Emacs."
  16. :type git
  17. :url "https://github.com/capitaomorte/yasnippet.git"
  18. :features "yasnippet"
  19. :prepare (lambda ()
  20. ;; Set up the default snippets directory
  21. ;;
  22. ;; Principle: don't override any user settings
  23. ;; for yas/snippet-dirs, whether those were made
  24. ;; with setq or customize. If the user doesn't
  25. ;; want the default snippets, she shouldn't get
  26. ;; them!
  27. (unless (or (boundp 'yas/snippet-dirs) (get 'yas/snippet-dirs 'customized-value))
  28. (setq yas/snippet-dirs
  29. (list (concat el-get-dir (file-name-as-directory "yasnippet") "snippets")))))
  30. :post-init (lambda ()
  31. ;; Trick customize into believing the standard
  32. ;; value includes the default snippets.
  33. ;; yasnippet would probably do this itself,
  34. ;; except that it doesn't include an
  35. ;; installation procedure that sets up the
  36. ;; snippets directory, and thus doesn't know
  37. ;; where those snippets will be installed. See
  38. ;; http://code.google.com/p/yasnippet/issues/detail?id=179
  39. (put 'yas/snippet-dirs 'standard-value
  40. ;; as cus-edit.el specifies, "a cons-cell
  41. ;; whose car evaluates to the standard
  42. ;; value"
  43. (list (list 'quote
  44. (list (concat el-get-dir (file-name-as-directory "yasnippet") "snippets"))))))
  45. ;; byte-compile load vc-svn and that fails
  46. ;; see https://github.com/dimitri/el-get/issues/200
  47. :compile nil)))
  48. (setq prelude-packages
  49. (append
  50. '()
  51. (mapcar 'el-get-source-name el-get-sources)))
  52. (el-get 'sync prelude-packages)
  53. (provide 'prelude-el-get)