From b1c870c9e8b8fd7001234d60fbb110c028c2f350 Mon Sep 17 00:00:00 2001 From: Juanma Barranquero Date: Thu, 27 Mar 2014 01:20:50 +0100 Subject: [PATCH] lisp/emacs-lisp/package-x.el: Follow-up to change in package.el. (package--archive-contents-from-url): Use url-insert-file-contents; package-handle-response no longer exists. --- lisp/ChangeLog | 5 +++++ lisp/emacs-lisp/package-x.el | 18 ++++++------------ 2 files changed, 11 insertions(+), 12 deletions(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 468e83f4218..b0e3f041ec2 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,8 @@ +2014-03-27 Juanma Barranquero + + * emacs-lisp/package-x.el (package--archive-contents-from-url): + Use url-insert-file-contents; package-handle-response no longer exists. + 2014-03-26 Juanma Barranquero * emacs-lisp/package.el: Fix bug#16733 (again). diff --git a/lisp/emacs-lisp/package-x.el b/lisp/emacs-lisp/package-x.el index 6a6a62dc916..1d9d1a04668 100644 --- a/lisp/emacs-lisp/package-x.el +++ b/lisp/emacs-lisp/package-x.el @@ -114,18 +114,12 @@ inserted after its first occurrence in the file." (defun package--archive-contents-from-url (archive-url) "Parse archive-contents file at ARCHIVE-URL. Return the file contents, as a string, or nil if unsuccessful." - (ignore-errors - (when archive-url - (let* ((buffer (url-retrieve-synchronously - (concat archive-url "archive-contents")))) - (set-buffer buffer) - (package-handle-response) - (re-search-forward "^$" nil 'move) - (forward-char) - (delete-region (point-min) (point)) - (prog1 (package-read-from-string - (buffer-substring-no-properties (point-min) (point-max))) - (kill-buffer buffer)))))) + (when archive-url + (with-temp-buffer + (ignore-errors + (url-insert-file-contents (concat archive-url "archive-contents")) + (package-read-from-string + (buffer-substring-no-properties (point-min) (point-max))))))) (defun package--archive-contents-from-file () "Parse the archive-contents at `package-archive-upload-base'" -- 2.39.2