changeset 91974:83fb82614615

(rmail-autodetect): Add .exe extension to movemail on Windows.
author Glenn Morris <rgm@gnu.org>
date Wed, 20 Feb 2008 05:59:41 +0000
parents 9592711aac8d
children 2d2d364dac0e
files lisp/mail/rmail.el
diffstat 1 files changed, 9 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/mail/rmail.el	Wed Feb 20 05:40:35 2008 +0000
+++ b/lisp/mail/rmail.el	Wed Feb 20 05:59:41 2008 +0000
@@ -219,7 +219,15 @@
       (dolist (dir (append rmail-movemail-search-path exec-path
 			   (list exec-directory)))
 	(when (and dir (file-accessible-directory-p dir))
-	  (let ((progname (expand-file-name "movemail" dir)))
+	  ;; Previously, this didn't have to work on Windows, because
+	  ;; rmail-insert-inbox-text before r1.439 fell back to using
+	  ;; (expand-file-name "movemail" exec-directory) and just
+	  ;; assuming it would work.
+	  ;; http://lists.gnu.org/archive/html/bug-gnu-emacs/2008-02/msg00087.html
+	  (let ((progname (expand-file-name
+			   (concat "movemail"
+				   (if (memq system-type '(ms-dos windows-nt))
+				       ".exe")) dir)))
 	    (when (and (not (file-directory-p progname))
 		       (file-executable-p progname))
 	      (let ((x (rmail-probe progname)))