summaryrefslogtreecommitdiff
path: root/lisp
diff options
context:
space:
mode:
authorStefan Monnier <monnier@iro.umontreal.ca>2018-01-15 13:15:12 -0500
committerStefan Monnier <monnier@iro.umontreal.ca>2018-01-15 13:15:12 -0500
commit8e05cb61a247a9035c5bf33b55c933d48c964dbc (patch)
tree8ce6da4da9493c7471a44262c226609dd072631c /lisp
parentfe258a4b887753734cda4bb717c2d1c3ca6d987b (diff)
downloademacs-8e05cb61a247a9035c5bf33b55c933d48c964dbc.tar.gz
emacs-8e05cb61a247a9035c5bf33b55c933d48c964dbc.tar.bz2
emacs-8e05cb61a247a9035c5bf33b55c933d48c964dbc.zip
* lisp/mail/smtpmail.el (smtpmail-send-data-1): No string-as-multibyte
This is not needed any more since unibyte strings will be sent as-is anyway by process-send-string. (smtpmail-via-smtp): Avoid set-buffer-process-coding-system.
Diffstat (limited to 'lisp')
-rw-r--r--lisp/mail/smtpmail.el12
1 files changed, 6 insertions, 6 deletions
diff --git a/lisp/mail/smtpmail.el b/lisp/mail/smtpmail.el
index 186307fc380..403a5c35518 100644
--- a/lisp/mail/smtpmail.el
+++ b/lisp/mail/smtpmail.el
@@ -683,7 +683,9 @@ Returns an error if the server cannot be contacted."
(setq buffer-undo-list t)
(erase-buffer))
- ;; open the connection to the server
+ ;; Open the connection to the server.
+ ;; FIXME: Should we use raw-text-dos coding system to handle the r\n
+ ;; for us?
(let ((coding-system-for-read 'binary)
(coding-system-for-write 'binary))
(setq result
@@ -720,9 +722,8 @@ Returns an error if the server cannot be contacted."
(throw 'done (format "Connection not allowed: %s" greeting))))
(with-current-buffer process-buffer
- (set-buffer-process-coding-system 'raw-text-unix 'raw-text-unix)
- (make-local-variable 'smtpmail-read-point)
- (setq smtpmail-read-point (point-min))
+ (set-process-coding-system process 'raw-text-unix 'raw-text-unix)
+ (setq-local smtpmail-read-point (point-min))
(let* ((capabilities (plist-get (cdr result) :capabilities))
(code (smtpmail-response-code capabilities)))
@@ -945,8 +946,7 @@ Returns an error if the server cannot be contacted."
(if (and (multibyte-string-p data)
smtpmail-code-conv-from)
- (setq data (string-as-multibyte ;FIXME: ???
- (encode-coding-string data smtpmail-code-conv-from))))
+ (setq data (encode-coding-string data smtpmail-code-conv-from)))
(if smtpmail-debug-info
(insert data "\r\n"))