emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] master 048133d: Default to https for elpa.gnu.org if gnutl


From: Glenn Morris
Subject: [Emacs-diffs] master 048133d: Default to https for elpa.gnu.org if gnutls available
Date: Tue, 4 Apr 2017 19:05:08 -0400 (EDT)

branch: master
commit 048133d4886d2e7fa547879478127edc9a9243f6
Author: Glenn Morris <address@hidden>
Commit: Glenn Morris <address@hidden>

    Default to https for elpa.gnu.org if gnutls available
    
    * lisp/emacs-lisp/package.el (package-archives):
    Default to https for elpa.gnu.org if gnutls is available.  Ref:
    http://lists.gnu.org/archive/html/emacs-devel/2015-05/msg00130.html
---
 lisp/emacs-lisp/package.el | 8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)

diff --git a/lisp/emacs-lisp/package.el b/lisp/emacs-lisp/package.el
index 8d5fac9..fadd869 100644
--- a/lisp/emacs-lisp/package.el
+++ b/lisp/emacs-lisp/package.el
@@ -194,14 +194,16 @@ If VERSION is nil, the package is not loaded (it is 
\"disabled\")."
   :risky t
   :version "24.1")
 
-(defcustom package-archives '(("gnu" . "http://elpa.gnu.org/packages/";))
+(defcustom package-archives `(("gnu" .
+                               ,(format "http%s://elpa.gnu.org/packages/"
+                                        (if (gnutls-available-p) "s" ""))))
   "An alist of archives from which to fetch.
 The default value points to the GNU Emacs package repository.
 
 Each element has the form (ID . LOCATION).
  ID is an archive name, as a string.
  LOCATION specifies the base location for the archive.
-  If it starts with \"http:\", it is treated as a HTTP URL;
+  If it starts with \"http(s):\", it is treated as an HTTP(S) URL;
   otherwise it should be an absolute directory name.
   (Other types of URL are currently not supported.)
 
@@ -210,7 +212,7 @@ a package can run arbitrary code."
   :type '(alist :key-type (string :tag "Archive name")
                 :value-type (string :tag "URL or directory name"))
   :risky t
-  :version "24.1")
+  :version "26.1")                      ; gnutls test
 
 (defcustom package-menu-hide-low-priority 'archive
   "If non-nil, hide low priority packages from the packages menu.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]