[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] emacs-26 eb67689: * lisp/mail/smtpmail.el (smtpmail-send-q
From: |
Juri Linkov |
Subject: |
[Emacs-diffs] emacs-26 eb67689: * lisp/mail/smtpmail.el (smtpmail-send-queued-mail): Load file with .el suffix. |
Date: |
Wed, 17 Oct 2018 18:24:49 -0400 (EDT) |
branch: emacs-26
commit eb6768977effe5994b6fe3afcfa262465ba631ab
Author: Juri Linkov <address@hidden>
Commit: Juri Linkov <address@hidden>
* lisp/mail/smtpmail.el (smtpmail-send-queued-mail): Load file with .el
suffix.
For the case when load-prefer-newer is t, ensure loading the right file
by explicitly adding the .el suffix. Use the same variable names
as in the function smtpmail-send-it. (Bug#33055)
---
lisp/mail/smtpmail.el | 13 +++++++------
1 file changed, 7 insertions(+), 6 deletions(-)
diff --git a/lisp/mail/smtpmail.el b/lisp/mail/smtpmail.el
index 571089d..baf50dd 100644
--- a/lisp/mail/smtpmail.el
+++ b/lisp/mail/smtpmail.el
@@ -402,21 +402,22 @@ The list is in preference order.")
(with-temp-buffer
;; Get index, get first mail, send it, update index, get second
;; mail, send it, etc...
- (let ((file-msg "")
+ (let (file-data file-elisp
(qfile (expand-file-name smtpmail-queue-index-file
smtpmail-queue-dir))
result)
(insert-file-contents qfile)
(goto-char (point-min))
(while (not (eobp))
- (setq file-msg (buffer-substring (point) (line-end-position)))
- (load file-msg)
+ (setq file-data (buffer-substring (point) (line-end-position)))
+ (setq file-elisp (concat file-data ".el"))
+ (load file-elisp)
;; Insert the message literally: it is already encoded as per
;; the MIME headers, and code conversions might guess the
;; encoding wrongly.
(with-temp-buffer
(let ((coding-system-for-read 'no-conversion))
- (insert-file-contents file-msg))
+ (insert-file-contents file-data))
(let ((smtpmail-mail-address
(or (and mail-specify-envelope-from (mail-envelope-from))
user-mail-address)))
@@ -426,8 +427,8 @@ The list is in preference order.")
(current-buffer)))
(error "Sending failed: %s" result))
(error "Sending failed; no recipients"))))
- (delete-file file-msg)
- (delete-file (concat file-msg ".el"))
+ (delete-file file-data)
+ (delete-file file-elisp)
(delete-region (point-at-bol) (point-at-bol 2)))
(write-region (point-min) (point-max) qfile))))
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Emacs-diffs] emacs-26 eb67689: * lisp/mail/smtpmail.el (smtpmail-send-queued-mail): Load file with .el suffix.,
Juri Linkov <=