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.

58 lines
2.5 KiB

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