branch: master
commit 7ba4f40ef0a013a9761accf805317f7b68c2c4b4
Author: John Wiegley <[email protected]>
Commit: John Wiegley <[email protected]>
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