changeset 5399:67aa88583b90

(rmail-output-to-rmail-file): If just a dir is specified, use default name in specified dir.
author Richard M. Stallman <rms@gnu.org>
date Sat, 01 Jan 1994 08:31:33 +0000
parents 499f25507242
children dd2c5504bcc1
files lisp/mail/rmailout.el
diffstat 1 files changed, 13 insertions(+), 10 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/mail/rmailout.el	Sat Jan 01 06:21:59 1994 +0000
+++ b/lisp/mail/rmailout.el	Sat Jan 01 08:31:33 1994 +0000
@@ -61,16 +61,19 @@
 	     ;; If not suggestions, use same file as last time.
 	     (or answer rmail-last-rmail-file))))
      (list (setq rmail-last-rmail-file
-		 (expand-file-name
-		  (or
-		   (read-file-name
-		    (concat "Output message to Rmail file: (default "
-			    (file-name-nondirectory default-file)
-			    ") ")
-		    (file-name-directory default-file)
-		    default-file)
-		   default-file)
-		  (file-name-directory default-file)))
+		 (let ((read-file
+			(read-file-name
+			 (concat "Output message to Rmail file: (default "
+				 (file-name-nondirectory default-file)
+				 ") ")
+			 (file-name-directory default-file)
+			 default-file)))
+		   (if (file-directory-p read-file)
+		       (expand-file-name (file-name-nondirectory default-file)
+					 read-file)
+		     (expand-file-name
+		      (or read-file default-file)
+		      (file-name-directory default-file)))))
 	   (prefix-numeric-value current-prefix-arg))))
   (or count (setq count 1))
   (setq file-name