* lisp/emacs-lisp/package.el (package--with-work-buffer-async):

Fix error reporting.
This commit is contained in:
Artur Malabarba 2015-06-17 16:59:55 +01:00
parent 02617f1507
commit d6dd70b064

View file

@ -1136,10 +1136,10 @@ For a description of the other arguments see
(condition-case error-signal
(url-retrieve (concat ,location-1 ,file-1)
(lambda (status)
(if (eq (car status) :error)
(if-let ((er (plist-get status :error)))
(progn (if (functionp ,async-1)
(funcall ,async-1))
(signal (cdar status) (cddr status)))
(signal (car er) (cdr er)))
(goto-char (point-min))
(unless (search-forward "\n\n" nil 'noerror)
(error "Invalid url response in buffer %s"