aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGlenn Morris2017-04-04 19:04:52 -0400
committerGlenn Morris2017-04-04 19:04:52 -0400
commit048133d4886d2e7fa547879478127edc9a9243f6 (patch)
tree60a01bd2c60787294f94d9bdae6293e9e3555482
parent82b9efc869dddcbd5677867b84b20ae155b5b9da (diff)
downloademacs-048133d4886d2e7fa547879478127edc9a9243f6.tar.gz
emacs-048133d4886d2e7fa547879478127edc9a9243f6.zip
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
-rw-r--r--lisp/emacs-lisp/package.el8
1 files changed, 5 insertions, 3 deletions
diff --git a/lisp/emacs-lisp/package.el b/lisp/emacs-lisp/package.el
index 8d5fac96cfb..fadd869c9d9 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\")."
194 :risky t 194 :risky t
195 :version "24.1") 195 :version "24.1")
196 196
197(defcustom package-archives '(("gnu" . "http://elpa.gnu.org/packages/")) 197(defcustom package-archives `(("gnu" .
198 ,(format "http%s://elpa.gnu.org/packages/"
199 (if (gnutls-available-p) "s" ""))))
198 "An alist of archives from which to fetch. 200 "An alist of archives from which to fetch.
199The default value points to the GNU Emacs package repository. 201The default value points to the GNU Emacs package repository.
200 202
201Each element has the form (ID . LOCATION). 203Each element has the form (ID . LOCATION).
202 ID is an archive name, as a string. 204 ID is an archive name, as a string.
203 LOCATION specifies the base location for the archive. 205 LOCATION specifies the base location for the archive.
204 If it starts with \"http:\", it is treated as a HTTP URL; 206 If it starts with \"http(s):\", it is treated as an HTTP(S) URL;
205 otherwise it should be an absolute directory name. 207 otherwise it should be an absolute directory name.
206 (Other types of URL are currently not supported.) 208 (Other types of URL are currently not supported.)
207 209
@@ -210,7 +212,7 @@ a package can run arbitrary code."
210 :type '(alist :key-type (string :tag "Archive name") 212 :type '(alist :key-type (string :tag "Archive name")
211 :value-type (string :tag "URL or directory name")) 213 :value-type (string :tag "URL or directory name"))
212 :risky t 214 :risky t
213 :version "24.1") 215 :version "26.1") ; gnutls test
214 216
215(defcustom package-menu-hide-low-priority 'archive 217(defcustom package-menu-hide-low-priority 'archive
216 "If non-nil, hide low priority packages from the packages menu. 218 "If non-nil, hide low priority packages from the packages menu.