From: Glenn Morris Date: Tue, 4 Apr 2017 23:39:57 +0000 (-0400) Subject: Advertise https for homepage of gnu.org packages X-Git-Tag: emacs-26.0.90~521^2~727 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=f981c611e26e906a88ee52806c78e07bbaa2b14b;p=emacs.git Advertise https for homepage of gnu.org packages * lisp/emacs-lisp/package.el (describe-package-1): Use https, if supported, for the homepage of packages on gnu.org. --- diff --git a/lisp/emacs-lisp/package.el b/lisp/emacs-lisp/package.el index fadd869c9d9..85acf60d08e 100644 --- a/lisp/emacs-lisp/package.el +++ b/lisp/emacs-lisp/package.el @@ -2354,6 +2354,13 @@ Otherwise no newline is inserted." (package-desc-name pkg)))) (insert "\n"))) (when homepage + ;; Prefer https for the homepage of packages on gnu.org. + (let ((gnu (cdr (assoc "gnu" package-archives)))) + (and gnu + (string-match-p "^https" gnu) + (string-match-p "^http://\\(elpa\\|www\\)\\.gnu\\.org/" homepage) + (setq homepage + (replace-regexp-in-string "^http" "https" homepage)))) (package--print-help-section "Homepage") (help-insert-xref-button homepage 'help-url homepage) (insert "\n"))