emacs-elpa-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[nongnu] elpa/webpaste 015bb9d 057/298: Refactored away add-to-list in f


From: ELPA Syncer
Subject: [nongnu] elpa/webpaste 015bb9d 057/298: Refactored away add-to-list in favor of cl-pushnew in two more places
Date: Thu, 9 Dec 2021 18:59:43 -0500 (EST)

branch: elpa/webpaste
commit 015bb9de15fe12b84b05c1ffd785846f39a087e1
Author: Elis Axelsson <elis.axelsson@gmail.com>
Commit: Elis Axelsson <elis.axelsson@gmail.com>

    Refactored away add-to-list in favor of cl-pushnew in two more places
---
 webpaste.el | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/webpaste.el b/webpaste.el
index 50490b3..9c1403a 100644
--- a/webpaste.el
+++ b/webpaste.el
@@ -65,9 +65,9 @@ each run.")
      (lambda (text)
        "Paste TEXT to http://ix.io/.";
 
-       (let ((post-data '()))
-         ;; Construct post data
-         (add-to-list 'post-data (cons "f:1" text))
+       (let ((post-data))
+         ;; Add TEXT to POST-DATA
+         (cl-pushnew (cons "f:1" text) post-data)
 
          ;; Use request.el to do request to ix.io to submit data
          (request "http://ix.io/";
@@ -93,7 +93,7 @@ each run.")
                           ("expiry_days" . "1"))))
 
          ;; Add TEXT as content
-         (add-to-list 'post-data (cons "content" text))
+         (cl-pushnew (cons "content" text) post-data)
 
          ;; Use request.el to do request to dpaste.com to submit data
          (request "http://dpaste.com/api/v2/";



reply via email to

[Prev in Thread] Current Thread [Next in Thread]