* lisp/emacs-lisp/package.el: Fix free variable warnings.

(package--with-response-buffer): Replace two usages of
`macroexp-let2*' with `let'.
This commit is contained in:
Artur Malabarba 2016-05-18 20:09:24 -03:00
parent 6e7129551c
commit ebc3a94e27

View file

@ -1154,44 +1154,44 @@ errors signaled by ERROR-FORM or by BODY).
(while (keywordp (car body)) (while (keywordp (car body))
(setq body (cdr (cdr body)))) (setq body (cdr (cdr body))))
(macroexp-let2* nil ((url-1 url) (macroexp-let2* nil ((url-1 url)
(url-sym (make-symbol "url"))
(b-sym (make-symbol "b-sym"))
(noerror-1 noerror)) (noerror-1 noerror))
`(cl-macrolet ((unless-error (body-2 &rest before-body) (let ((url-sym (make-symbol "url"))
(let ((err (make-symbol "err"))) (b-sym (make-symbol "b-sym")))
`(with-temp-buffer `(cl-macrolet ((unless-error (body-2 &rest before-body)
(when (condition-case ,err (let ((err (make-symbol "err")))
(progn ,@before-body t) `(with-temp-buffer
,(list 'error ',error-form (when (condition-case ,err
(list 'unless ',noerror-1 (progn ,@before-body t)
`(signal (car ,err) (cdr ,err))))) ,(list 'error ',error-form
,@body-2))))) (list 'unless ',noerror-1
(if (string-match-p "\\`https?:" ,url-1) `(signal (car ,err) (cdr ,err)))))
(let ((,url-sym (concat ,url-1 ,file))) ,@body-2)))))
(if ,async (if (string-match-p "\\`https?:" ,url-1)
(unless-error nil (let ((,url-sym (concat ,url-1 ,file)))
(url-retrieve ,url-sym (if ,async
(lambda (status) (unless-error nil
(let ((,b-sym (current-buffer))) (url-retrieve ,url-sym
(require 'url-handlers) (lambda (status)
(unless-error ,body (let ((,b-sym (current-buffer)))
(when-let ((er (plist-get status :error))) (require 'url-handlers)
(error "Error retrieving: %s %S" ,url-sym er)) (unless-error ,body
(with-current-buffer ,b-sym (when-let ((er (plist-get status :error)))
(goto-char (point-min)) (error "Error retrieving: %s %S" ,url-sym er))
(unless (search-forward-regexp "^\r?\n\r?" nil 'noerror) (with-current-buffer ,b-sym
(error "Error retrieving: %s %S" ,url-sym "incomprehensible buffer"))) (goto-char (point-min))
(url-insert-buffer-contents ,b-sym ,url-sym) (unless (search-forward-regexp "^\r?\n\r?" nil 'noerror)
(kill-buffer ,b-sym) (error "Error retrieving: %s %S" ,url-sym "incomprehensible buffer")))
(goto-char (point-min))))) (url-insert-buffer-contents ,b-sym ,url-sym)
nil (kill-buffer ,b-sym)
'silent)) (goto-char (point-min)))))
(unless-error ,body (url-insert-file-contents ,url-sym)))) nil
(unless-error ,body 'silent))
(let ((url (expand-file-name ,file ,url-1))) (unless-error ,body (url-insert-file-contents ,url-sym))))
(unless (file-name-absolute-p url) (unless-error ,body
(error "Location %s is not a url nor an absolute file name" url)) (let ((url (expand-file-name ,file ,url-1)))
(insert-file-contents url))))))) (unless (file-name-absolute-p url)
(error "Location %s is not a url nor an absolute file name" url))
(insert-file-contents url))))))))
(define-error 'bad-signature "Failed to verify signature") (define-error 'bad-signature "Failed to verify signature")