From 91ae54addc2a5506dbe00e67912aaaca8f093178 Mon Sep 17 00:00:00 2001 From: Josha von Gizycki Date: Wed, 20 Nov 2019 16:43:12 +0100 Subject: [PATCH] redo melpa source --- init.el | 23 +++++++++++++++++++---- 1 file changed, 19 insertions(+), 4 deletions(-) diff --git a/init.el b/init.el index fac9d6e..9174bdb 100644 --- a/init.el +++ b/init.el @@ -1,10 +1,25 @@ -;;(require 'package) +(require 'package) ;;(add-to-list 'package-archives ;; '("melpa-stable" . "http://stable.melpa.org/packages/") t) -(require 'package) -(add-to-list 'package-archives - '("melpa" . "http://melpa.milkbox.net/packages/") t) +;; Melpa shit + +(let* ((no-ssl (and (memq system-type '(windows-nt ms-dos)) + (not (gnutls-available-p)))) + (proto (if no-ssl "http" "https"))) + (when no-ssl + (warn "\ +Your version of Emacs does not support SSL connections, +which is unsafe because it allows man-in-the-middle attacks. +There are two things you can do about this warning: +1. Install an Emacs version that does support SSL and be safe. +2. Remove this warning from your init file so you won't see it again.")) + ;; Comment/uncomment these two lines to enable/disable MELPA and MELPA Stable as desired + (add-to-list 'package-archives (cons "melpa" (concat proto "://melpa.org/packages/")) t) + ;;(add-to-list 'package-archives (cons "melpa-stable" (concat proto "://stable.melpa.org/packages/")) t) + (when (< emacs-major-version 24) + ;; For important compatibility libraries like cl-lib + (add-to-list 'package-archives (cons "gnu" (concat proto "://elpa.gnu.org/packages/"))))) (package-initialize) (unless package-archive-contents