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

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

[elpa] master 7ba4f40 022/187: Always base64 encode


From: Michael Albinus
Subject: [elpa] master 7ba4f40 022/187: Always base64 encode
Date: Wed, 30 Dec 2015 11:49:27 +0000

branch: master
commit 7ba4f40ef0a013a9761accf805317f7b68c2c4b4
Author: John Wiegley <address@hidden>
Commit: John Wiegley <address@hidden>

    Always base64 encode
---
 async.el |   19 ++++++-------------
 1 files changed, 6 insertions(+), 13 deletions(-)

diff --git a/async.el b/async.el
index 698a044..f9c561c 100644
--- a/async.el
+++ b/async.el
@@ -115,24 +115,17 @@ as follows:
                  (process-name proc) (process-exit-status proc)))))))
 
 (defun async--receive-sexp (&optional stream)
-  (let ((sexp (if async-send-over-pipe
-                  (read (base64-decode-string (read stream)))
-                (read stream))))
+  (let ((sexp (read (base64-decode-string (read stream)))))
     (if async-debug
         (message "Received sexp {{{%s}}}" (pp-to-string sexp)))
     (eval sexp)))
 
 (defun async--insert-sexp (sexp)
-  (if async-send-over-pipe
-      (progn
-        (prin1 sexp (current-buffer))
-        ;; Just in case the string we're sending might contain EOF
-        (base64-encode-region (point-min) (point-max) t)
-        (goto-char (point-min)) (insert ?\")
-        (goto-char (point-max)) (insert ?\" ?\n))
-    (let ((print-escape-newlines t))
-      (prin1 sexp (current-buffer)))
-    (insert ?\n)))
+  (prin1 sexp (current-buffer))
+  ;; Just in case the string we're sending might contain EOF
+  (base64-encode-region (point-min) (point-max) t)
+  (goto-char (point-min)) (insert ?\")
+  (goto-char (point-max)) (insert ?\" ?\n))
 
 (defun async--transmit-sexp (process sexp)
   (with-temp-buffer



reply via email to

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