From: Richard M. Stallman Date: Sun, 5 May 1996 03:56:36 +0000 (+0000) Subject: (ps-print-preprint): Special handling if X-Git-Tag: emacs-19.34~699 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=03f962fbc4ac4f958931a9c73423b49fe9315077;p=emacs.git (ps-print-preprint): Special handling if file entered in the minibuffer is a directory. --- 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 (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