protoculture-packages.el 1.0 KB

12345678910111213141516171819202122
  1. ;; Use melpa
  2. (require 'package)
  3. (let* ((no-ssl (and (memq system-type '(windows-nt ms-dos))
  4. (not (gnutls-available-p))))
  5. (proto (if no-ssl "http" "https")))
  6. (when no-ssl
  7. (warn "\
  8. Your version of Emacs does not support SSL connections,
  9. which is unsafe because it allows man-in-the-middle attacks.
  10. There are two things you can do about this warning:
  11. 1. Install an Emacs version that does support SSL and be safe.
  12. 2. Remove this warning from your init file so you won't see it again."))
  13. ;; Comment/uncomment these two lines to enable/disable MELPA and MELPA Stable as desired
  14. (add-to-list 'package-archives (cons "melpa" (concat proto "://melpa.org/packages/")) t)
  15. ;;(add-to-list 'package-archives (cons "melpa-stable" (concat proto "://stable.melpa.org/packages/")) t)
  16. (when (< emacs-major-version 24)
  17. ;; For important compatibility libraries like cl-lib
  18. (add-to-list 'package-archives (cons "gnu" (concat proto "://elpa.gnu.org/packages/")))))
  19. (package-initialize)
  20. (provide 'protoculture-packages)