Subject: 27.0.50; load-prefer-newer loads wrong file

From: Juri Linkov <[email-masked]>
Date: Tue, 16 Oct 2018 01:43:15 +0300

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
                                    smtpmail-queue-dir))
+          ;; 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)
 	  result)
       (insert-file-contents qfile)
       (goto-char (point-min))