changeset 15163:df250bc97b46

(ps-print-preprint): Special handling if file entered in the minibuffer is a directory.
author Richard M. Stallman <rms@gnu.org>
date Sun, 05 May 1996 03:56:36 +0000
parents a16fd1b9abb5
children f7cdb1d402cc
files lisp/ps-print.el
diffstat 1 files changed, 5 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/ps-print.el	Sun May 05 03:55:07 1996 +0000
+++ b/lisp/ps-print.el	Sun May 05 03:56:36 1996 +0000
@@ -1168,9 +1168,11 @@
 	       (listp filename)))
       (let* ((name (concat (buffer-name) ".ps"))
 	     (prompt (format "Save PostScript to file: (default %s) "
-			     name)))
-	(read-file-name prompt default-directory
-			name nil))))
+			     name))
+	     (res (read-file-name prompt default-directory name nil)))
+	(if (file-directory-p res)
+	    (expand-file-name name (file-name-as-directory res))
+	  res))))
 
 ;; The following functions implement a simple list-buffering scheme so
 ;; that ps-print doesn't have to repeatedly switch between buffers