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

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

[elpa] externals/graphql 335ec3a9c5 08/56: More appropriate function nam


From: ELPA Syncer
Subject: [elpa] externals/graphql 335ec3a9c5 08/56: More appropriate function names for argument encoding
Date: Sat, 29 Oct 2022 13:57:52 -0400 (EDT)

branch: externals/graphql
commit 335ec3a9c579ef9f47dc25be6234c9a2567666e6
Author: Sean Allred <code@seanallred.com>
Commit: Sean Allred <code@seanallred.com>

    More appropriate function names for argument encoding
    
    They aren't parameter declarations; they're arguments for existing
    parameters.  Rename
    
        graphql--encode-parameter{-pair}
    
    to
    
        graphql--encode-argument{-pair}
---
 graphql.el | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/graphql.el b/graphql.el
index 18b73091c1..88398e69a6 100644
--- a/graphql.el
+++ b/graphql.el
@@ -43,9 +43,9 @@
 (defun graphql--encode-list (l)
   (when (and (consp l) (consp (car l)))
     (mapconcat #'graphql--encode l " ")))
-(defun graphql--encode-parameter-pair (pair)
-  (graphql--encode-parameter (car pair) (cdr pair)))
-(defun graphql--encode-parameter (key value)
+(defun graphql--encode-argument-pair (pair)
+  (graphql--encode-argument (car pair) (cdr pair)))
+(defun graphql--encode-argument (key value)
   (format "%s:%s"
           key
           (cond
@@ -54,7 +54,7 @@
            ((eq '$ (car-safe value))
             (format "$%s" (cadr value)))
            ((listp value)
-            (format "{%s}" (mapconcat #'graphql--encode-parameter-pair value 
",")))
+            (format "{%s}" (mapconcat #'graphql--encode-argument-pair value 
",")))
            ((stringp value)
             (format "\"%s\"" value))
            ((numberp value)
@@ -87,7 +87,7 @@
             (when arguments
               ;; Format arguments "key:value, ..."
               (format "(%s)"
-                      (mapconcat #'graphql--encode-parameter-pair arguments 
",")))
+                      (mapconcat #'graphql--encode-argument-pair arguments 
",")))
             (when name
               (format " %S" name))
             (when fields



reply via email to

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