aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorArtur Malabarba2016-05-18 20:09:24 -0300
committerArtur Malabarba2016-05-18 20:09:24 -0300
commitebc3a94e27ec9dcbe24790795741c062bed2c1a0 (patch)
tree90908302df4ca5da017b44e4e31f98d66aa30a9a
parent6e7129551ca2ff67732549ae8b1b43276c410c95 (diff)
downloademacs-ebc3a94e27ec9dcbe24790795741c062bed2c1a0.tar.gz
emacs-ebc3a94e27ec9dcbe24790795741c062bed2c1a0.zip
* lisp/emacs-lisp/package.el: Fix free variable warnings.
(package--with-response-buffer): Replace two usages of `macroexp-let2*' with `let'.
-rw-r--r--lisp/emacs-lisp/package.el74
1 files changed, 37 insertions, 37 deletions
diff --git a/lisp/emacs-lisp/package.el b/lisp/emacs-lisp/package.el
index aa18c2d30bc..8f309cb798f 100644
--- a/lisp/emacs-lisp/package.el
+++ b/lisp/emacs-lisp/package.el
@@ -1154,44 +1154,44 @@ errors signaled by ERROR-FORM or by BODY).
1154 (while (keywordp (car body)) 1154 (while (keywordp (car body))
1155 (setq body (cdr (cdr body)))) 1155 (setq body (cdr (cdr body))))
1156 (macroexp-let2* nil ((url-1 url) 1156 (macroexp-let2* nil ((url-1 url)
1157 (url-sym (make-symbol "url"))
1158 (b-sym (make-symbol "b-sym"))
1159 (noerror-1 noerror)) 1157 (noerror-1 noerror))
1160 `(cl-macrolet ((unless-error (body-2 &rest before-body) 1158 (let ((url-sym (make-symbol "url"))
1161 (let ((err (make-symbol "err"))) 1159 (b-sym (make-symbol "b-sym")))
1162 `(with-temp-buffer 1160 `(cl-macrolet ((unless-error (body-2 &rest before-body)
1163 (when (condition-case ,err 1161 (let ((err (make-symbol "err")))
1164 (progn ,@before-body t) 1162 `(with-temp-buffer
1165 ,(list 'error ',error-form 1163 (when (condition-case ,err
1166 (list 'unless ',noerror-1 1164 (progn ,@before-body t)
1167 `(signal (car ,err) (cdr ,err))))) 1165 ,(list 'error ',error-form
1168 ,@body-2))))) 1166 (list 'unless ',noerror-1
1169 (if (string-match-p "\\`https?:" ,url-1) 1167 `(signal (car ,err) (cdr ,err)))))
1170 (let ((,url-sym (concat ,url-1 ,file))) 1168 ,@body-2)))))
1171 (if ,async 1169 (if (string-match-p "\\`https?:" ,url-1)
1172 (unless-error nil 1170 (let ((,url-sym (concat ,url-1 ,file)))
1173 (url-retrieve ,url-sym 1171 (if ,async
1174 (lambda (status) 1172 (unless-error nil
1175 (let ((,b-sym (current-buffer))) 1173 (url-retrieve ,url-sym
1176 (require 'url-handlers) 1174 (lambda (status)
1177 (unless-error ,body 1175 (let ((,b-sym (current-buffer)))
1178 (when-let ((er (plist-get status :error))) 1176 (require 'url-handlers)
1179 (error "Error retrieving: %s %S" ,url-sym er)) 1177 (unless-error ,body
1180 (with-current-buffer ,b-sym 1178 (when-let ((er (plist-get status :error)))
1181 (goto-char (point-min)) 1179 (error "Error retrieving: %s %S" ,url-sym er))
1182 (unless (search-forward-regexp "^\r?\n\r?" nil 'noerror) 1180 (with-current-buffer ,b-sym
1183 (error "Error retrieving: %s %S" ,url-sym "incomprehensible buffer"))) 1181 (goto-char (point-min))
1184 (url-insert-buffer-contents ,b-sym ,url-sym) 1182 (unless (search-forward-regexp "^\r?\n\r?" nil 'noerror)
1185 (kill-buffer ,b-sym) 1183 (error "Error retrieving: %s %S" ,url-sym "incomprehensible buffer")))
1186 (goto-char (point-min))))) 1184 (url-insert-buffer-contents ,b-sym ,url-sym)
1187 nil 1185 (kill-buffer ,b-sym)
1188 'silent)) 1186 (goto-char (point-min)))))
1189 (unless-error ,body (url-insert-file-contents ,url-sym)))) 1187 nil
1190 (unless-error ,body 1188 'silent))
1191 (let ((url (expand-file-name ,file ,url-1))) 1189 (unless-error ,body (url-insert-file-contents ,url-sym))))
1192 (unless (file-name-absolute-p url) 1190 (unless-error ,body
1193 (error "Location %s is not a url nor an absolute file name" url)) 1191 (let ((url (expand-file-name ,file ,url-1)))
1194 (insert-file-contents url))))))) 1192 (unless (file-name-absolute-p url)
1193 (error "Location %s is not a url nor an absolute file name" url))
1194 (insert-file-contents url))))))))
1195 1195
1196(define-error 'bad-signature "Failed to verify signature") 1196(define-error 'bad-signature "Failed to verify signature")
1197 1197