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

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

[nongnu] elpa/graphql-mode 033f6a074c 082/122: Don't use temp buffer, as


From: ELPA Syncer
Subject: [nongnu] elpa/graphql-mode 033f6a074c 082/122: Don't use temp buffer, as it breaks local variables
Date: Sat, 29 Jan 2022 08:03:36 -0500 (EST)

branch: elpa/graphql-mode
commit 033f6a074c909410f6a329745f77f818f8525536
Author: Artur Malabarba <artur@endlessparentheses.com>
Commit: Artur Malabarba <artur@endlessparentheses.com>

    Don't use temp buffer, as it breaks local variables
    
    In the previous implementation, setting `graphql-extra-headers` as a
    local variable didn't work because the variable was used inside
    `graphql-post-request` which was called inside a temp buffer.
    
    Removing the temp buffer solves this issue.
---
 graphql-mode.el | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/graphql-mode.el b/graphql-mode.el
index c61768903e..5e800ad5b8 100644
--- a/graphql-mode.el
+++ b/graphql-mode.el
@@ -94,8 +94,7 @@ of the variables used in the query."
   ;; Note that we need to get the value of graphql-url in the current
   ;; before before we switch to the temporary one.
   (let ((url graphql-url))
-    (with-temp-buffer
-      (graphql-post-request url query operation variables))))
+    (graphql-post-request url query operation variables)))
 
 (declare-function request "request")
 (declare-function request-response-data "request")



reply via email to

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