Skip to content

Commit

Permalink
Merge pull request #277455 from Vonfry/melpa/update-fix
Browse files Browse the repository at this point in the history
update-melpa: try to fix some compatiblility issues on cl-lib and url-retrive.
  • Loading branch information
pbsds authored Feb 10, 2024
2 parents 295bfd4 + 2e2097c commit 3c5b9e6
Showing 1 changed file with 6 additions and 7 deletions.
13 changes: 6 additions & 7 deletions pkgs/applications/editors/emacs/elisp-packages/update-melpa.el
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
(require 'semaphore-promise)
(require 'url)
(require 'json)
(require 'cl)
(require 'cl-lib)
(require 'subr-x)
(require 'seq)

Expand Down Expand Up @@ -77,7 +77,7 @@ return Promise to resolve in that process."

(defun parse-previous-archive (filename)
(let ((idx (make-hash-table :test 'equal)))
(loop for desc in
(cl-loop for desc in
(let ((json-object-type 'hash-table)
(json-array-type 'list)
(json-key-type 'symbol))
Expand Down Expand Up @@ -166,7 +166,7 @@ return Promise to resolve in that process."

(defun recipe-info (recipe-index ename)
(if-let (desc (gethash ename recipe-index))
(destructuring-bind (rcp-commit . rcp-sha256) desc
(cl-destructuring-bind (rcp-commit . rcp-sha256) desc
`((commit . ,rcp-commit)
(sha256 . ,rcp-sha256)))
`((error . "No recipe info"))))
Expand Down Expand Up @@ -204,7 +204,7 @@ return Promise to resolve in that process."
(seq-let [recipe-index unstable-sha stable-sha] res
(append `((ename . ,ename))
(if-let (desc (gethash ename recipe-index))
(destructuring-bind (rcp-commit . rcp-sha256) desc
(cl-destructuring-bind (rcp-commit . rcp-sha256) desc
(append `((commit . ,rcp-commit)
(sha256 . ,rcp-sha256))
(when (not unstable-aprops)
Expand Down Expand Up @@ -257,10 +257,9 @@ return Promise to resolve in that process."
url (lambda (status)
(funcall resolve (condition-case err
(progn
(goto-char (point-min))
(search-forward "\n\n")
(url-http-parse-headers)
(goto-char url-http-end-of-headers)
(message (buffer-substring (point-min) (point)))
(delete-region (point-min) (point))
(funcall parser))
(funcall reject err))))))))

Expand Down

0 comments on commit 3c5b9e6

Please sign in to comment.