   (require 'cl))
 
 (when (require 'package nil t)
-  (add-to-list 'package-archives
-               '("melpa" . "http://melpa.milkbox.net/packages/") t)
-  (add-to-list 'package-archives
-               '("marmalade" . "http://marmalade-repo.org/packages/") t)
+  (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)
   (let ((pkgs (loop for pkg in my/favorite-packages
                     unless (package-installed-p pkg)
                     collect pkg)))
     (when pkgs
       ;; check for new packages (package versions)
-      (message "%s" "Get latest versions of all packages...")
+      (message "%s %s" "Get latest versions of all packages..." pkgs)
       (package-refresh-contents)
       (message "%s" " done.")
       (dolist (pkg pkgs)

    markdown-mode
    auto-package-update
    swift-mode
    company-jedi
    py-autopep8
    flymake-python-pyflakes
    )
  "起動時に自動的にインストールされるパッケージのリスト")


    company-go
    open-junk-file
    gtags
    auto-async-byte-compile
    auto-save-buffers-enhanced
    exec-path-from-shell
