diff options
| author | Juanma Barranquero | 2014-03-27 01:20:50 +0100 |
|---|---|---|
| committer | Juanma Barranquero | 2014-03-27 01:20:50 +0100 |
| commit | b1c870c9e8b8fd7001234d60fbb110c028c2f350 (patch) | |
| tree | eb51e4f484ae326ee7cbd4037cfb59003d1b39b5 | |
| parent | 3fd3e736934750c8b0e73b8327f0b75d3b09bf78 (diff) | |
| download | emacs-b1c870c9e8b8fd7001234d60fbb110c028c2f350.tar.gz emacs-b1c870c9e8b8fd7001234d60fbb110c028c2f350.zip | |
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.
| -rw-r--r-- | lisp/ChangeLog | 5 | ||||
| -rw-r--r-- | 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 @@ | |||
| 1 | 2014-03-27 Juanma Barranquero <lekktu@gmail.com> | ||
| 2 | |||
| 3 | * emacs-lisp/package-x.el (package--archive-contents-from-url): | ||
| 4 | Use url-insert-file-contents; package-handle-response no longer exists. | ||
| 5 | |||
| 1 | 2014-03-26 Juanma Barranquero <lekktu@gmail.com> | 6 | 2014-03-26 Juanma Barranquero <lekktu@gmail.com> |
| 2 | 7 | ||
| 3 | * emacs-lisp/package.el: Fix bug#16733 (again). | 8 | * 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." | |||
| 114 | (defun package--archive-contents-from-url (archive-url) | 114 | (defun package--archive-contents-from-url (archive-url) |
| 115 | "Parse archive-contents file at ARCHIVE-URL. | 115 | "Parse archive-contents file at ARCHIVE-URL. |
| 116 | Return the file contents, as a string, or nil if unsuccessful." | 116 | Return the file contents, as a string, or nil if unsuccessful." |
| 117 | (ignore-errors | 117 | (when archive-url |
| 118 | (when archive-url | 118 | (with-temp-buffer |
| 119 | (let* ((buffer (url-retrieve-synchronously | 119 | (ignore-errors |
| 120 | (concat archive-url "archive-contents")))) | 120 | (url-insert-file-contents (concat archive-url "archive-contents")) |
| 121 | (set-buffer buffer) | 121 | (package-read-from-string |
| 122 | (package-handle-response) | 122 | (buffer-substring-no-properties (point-min) (point-max))))))) |
| 123 | (re-search-forward "^$" nil 'move) | ||
| 124 | (forward-char) | ||
| 125 | (delete-region (point-min) (point)) | ||
| 126 | (prog1 (package-read-from-string | ||
| 127 | (buffer-substring-no-properties (point-min) (point-max))) | ||
| 128 | (kill-buffer buffer)))))) | ||
| 129 | 123 | ||
| 130 | (defun package--archive-contents-from-file () | 124 | (defun package--archive-contents-from-file () |
| 131 | "Parse the archive-contents at `package-archive-upload-base'" | 125 | "Parse the archive-contents at `package-archive-upload-base'" |