]> code.delx.au - gnu-emacs/commitdiff
* lisp/emacs-lisp/package.el (package--with-work-buffer-async):
authorArtur Malabarba <bruce.connor.am@gmail.com>
Wed, 17 Jun 2015 15:59:55 +0000 (16:59 +0100)
committerArtur Malabarba <bruce.connor.am@gmail.com>
Wed, 17 Jun 2015 15:59:55 +0000 (16:59 +0100)
Fix error reporting.

lisp/emacs-lisp/package.el

index eef9ee10ecf1d9e8bf9b54bde30f3304fb63ae93..b3f1f2fc759b0213de895a53bde77110a89c0397 100644 (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"