aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRichard M. Stallman1996-05-05 03:56:36 +0000
committerRichard M. Stallman1996-05-05 03:56:36 +0000
commit03f962fbc4ac4f958931a9c73423b49fe9315077 (patch)
tree79465438bdcfd0b3aa2eddc6b92bc6c5f4eb3023
parentdf0d89b112fe203163cede520aa680c52ee8623b (diff)
downloademacs-03f962fbc4ac4f958931a9c73423b49fe9315077.tar.gz
emacs-03f962fbc4ac4f958931a9c73423b49fe9315077.zip
(ps-print-preprint): Special handling if
file entered in the minibuffer is a directory.
-rw-r--r--lisp/ps-print.el8
1 files changed, 5 insertions, 3 deletions
diff --git a/lisp/ps-print.el b/lisp/ps-print.el
index 7ae9814e45f..cc5066bcf6f 100644
--- a/lisp/ps-print.el
+++ b/lisp/ps-print.el
@@ -1168,9 +1168,11 @@ StandardEncoding 46 82 getinterval aload pop
1168 (listp filename))) 1168 (listp filename)))
1169 (let* ((name (concat (buffer-name) ".ps")) 1169 (let* ((name (concat (buffer-name) ".ps"))
1170 (prompt (format "Save PostScript to file: (default %s) " 1170 (prompt (format "Save PostScript to file: (default %s) "
1171 name))) 1171 name))
1172 (read-file-name prompt default-directory 1172 (res (read-file-name prompt default-directory name nil)))
1173 name nil)))) 1173 (if (file-directory-p res)
1174 (expand-file-name name (file-name-as-directory res))
1175 res))))
1174 1176
1175;; The following functions implement a simple list-buffering scheme so 1177;; The following functions implement a simple list-buffering scheme so
1176;; that ps-print doesn't have to repeatedly switch between buffers 1178;; that ps-print doesn't have to repeatedly switch between buffers