From 1395ef7ee85b065e2129ec608f7331f56eae1467 Mon Sep 17 00:00:00 2001 From: ueno Date: Sun, 12 Nov 2000 17:57:54 +0000 Subject: [PATCH] * smtp.el (smtp-primitive-data): Use `beginning-of-line' instead of `forward-char'. (smtp-read-response): Don't bind `case-fold-search'. (smtp-send-data): Don't save excursion. --- ChangeLog | 7 +++++++ smtp.el | 20 +++++++------------- 2 files changed, 14 insertions(+), 13 deletions(-) diff --git a/ChangeLog b/ChangeLog index 0a27f79..2f7ebb1 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +2000-11-12 Daiki Ueno + + * smtp.el (smtp-primitive-data): Use `beginning-of-line' instead of + `forward-char'. + (smtp-read-response): Don't bind `case-fold-search'. + (smtp-send-data): Don't save excursion. + 2000-11-10 Daiki Ueno * sasl-digest.el (sasl-digest-md5-challenge): Abolish. diff --git a/smtp.el b/smtp.el index 7674291..2a979d4 100644 --- a/smtp.el +++ b/smtp.el @@ -308,7 +308,6 @@ of the host to connect to. SERVICE is name of the service desired." (smtp-primitive-data package)) (let ((connection (smtp-find-connection (current-buffer)))) (when (smtp-connection-opened connection) - ;; QUIT (smtp-primitive-quit package) (smtp-close-connection connection))))) @@ -476,7 +475,7 @@ of the host to connect to. SERVICE is name of the service desired." (while (not (eobp)) (smtp-send-data process (buffer-substring (point) (progn (end-of-line)(point)))) - (forward-char))) + (beginning-of-line 2))) (smtp-send-command process ".") (setq response (smtp-read-response process)) (if (/= (car response) 250) @@ -511,8 +510,7 @@ of the host to connect to. SERVICE is name of the service desired." (signal 'smtp-response-error response)) (defun smtp-read-response (process) - (let (case-fold-search - (response-continue t) + (let ((response-continue t) response) (while response-continue (goto-char smtp-read-point) @@ -542,15 +540,11 @@ of the host to connect to. SERVICE is name of the service desired." (process-send-string process "\r\n"))) (defun smtp-send-data (process data) - (save-excursion - (set-buffer (process-buffer process)) - (goto-char (point-max)) - (setq smtp-read-point (point)) - ;; Escape "." at start of a line. - (if (eq (string-to-char data) ?.) - (process-send-string process ".")) - (process-send-string process data) - (process-send-string process "\r\n"))) + ;; Escape "." at start of a line. + (if (eq (string-to-char data) ?.) + (process-send-string process ".")) + (process-send-string process data) + (process-send-string process "\r\n")) (defun smtp-deduce-address-list (smtp-text-buffer header-start header-end) "Get address list suitable for smtp RCPT TO:
." -- 1.7.10.4