[Top][All Lists]

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

bug#33055: 27.0.50; load-prefer-newer loads wrong file

From: Juri Linkov
Subject: bug#33055: 27.0.50; load-prefer-newer loads wrong file
Date: Tue, 16 Oct 2018 01:43:15 +0300
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (x86_64-pc-linux-gnu)

Tags: patch

When load-prefer-newer is customized to t, smtpmail-send-queued-mail
fails to load the correct file.  This patch fixes it:

diff --git a/lisp/mail/smtpmail.el b/lisp/mail/smtpmail.el
index 8bc3cc78d9..a889cfd75b 100644
--- a/lisp/mail/smtpmail.el
+++ b/lisp/mail/smtpmail.el
@@ -407,6 +407,11 @@ smtpmail-send-queued-mail
     (let ((file-msg "")
           (qfile (expand-file-name smtpmail-queue-index-file
+          ;; To ensure that `load' below will load the right file
+          ;; with the suffix `.el' instead of a newer text file
+          ;; with the same name and without the suffix `.el',
+          ;; force load-prefer-newer to be nil:
+          (load-prefer-newer nil)
       (insert-file-contents qfile)
       (goto-char (point-min))

reply via email to

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