From 888466e7d1bbfa27594cb1bf450b1a7b9b007777 Mon Sep 17 00:00:00 2001 From: Gerard Vermeulen Date: Sun, 26 Feb 2023 18:47:24 +0100 Subject: [PATCH] Replace (setf (alist-get ...)) with the faster (setcdr (assq ...)) --- README.org | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/README.org b/README.org index 9968e30..9fceea4 100644 --- a/README.org +++ b/README.org @@ -5022,8 +5022,8 @@ Available versions: 0.2.0, 0.1.1, 0.1.0 (json-parse-buffer :array-type 'list :object-type 'alist)) (let ((alists pip-outdated-packages)) (while alists - (setf (alist-get 'name (car alists)) - (string-replace "_" "-" (alist-get 'name (car alists)))) + (setcdr (assq 'name (car alists)) + (string-replace "_" "-" (alist-get 'name (car alists)))) (setq alists (cdr alists)))) (kill-buffer) (message "Calling `%S' succeeded" #'pip-list-outdated)))) @@ -5147,7 +5147,7 @@ buffer to check whether upgrading has made the dependencies incompatible." (cl-pushnew rv (alist-get 'required_version old) :test #'equal)) (let* ((new (assq-delete-all 'dependencies (copy-alist parent))) (rvs (split-string (alist-get 'required_version new) "[,]+"))) - (setf (alist-get 'required_version new) rvs) + (setcdr (assq 'required_version new) rvs) (push new found)))) found)