diff options
author | Juanma Barranquero <lekktu@gmail.com> | 2014-03-27 18:34:22 +0100 |
---|---|---|
committer | Juanma Barranquero <lekktu@gmail.com> | 2014-03-27 18:34:22 +0100 |
commit | 1e757eb0a5bab2bdd26de8a6553ee5c2b2e2a381 (patch) | |
tree | 01db12aa0584e566f44f32c062a67f98ea836837 /lisp/emacs-lisp | |
parent | b9b37dd04e6f60ef16738efe1b396a9e0a461d86 (diff) | |
parent | 0c4e715c98919593413a76a0ab1458b0d10ea287 (diff) | |
download | emacs-1e757eb0a5bab2bdd26de8a6553ee5c2b2e2a381.tar.gz emacs-1e757eb0a5bab2bdd26de8a6553ee5c2b2e2a381.tar.bz2 emacs-1e757eb0a5bab2bdd26de8a6553ee5c2b2e2a381.zip |
Merge from emacs-24; up to 2014-03-24T03:06:35Z!dancol@dancol.org
Diffstat (limited to 'lisp/emacs-lisp')
-rw-r--r-- | lisp/emacs-lisp/package-x.el | 18 |
1 files changed, 6 insertions, 12 deletions
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'" |