]> code.delx.au - gnu-emacs/blobdiff - lisp/ps-print.el
(c-macro-expansion): Delete ??! trigraph in uniquestring.
[gnu-emacs] / lisp / ps-print.el
index 1f64b51c97417f97b080133a31275c7ee7d3c8a3..cc5066bcf6f079197efcfb38c850f8cb1faf6d5b 100644 (file)
@@ -1,8 +1,9 @@
 ;;; ps-print.el --- Jim's Pretty-Good PostScript Generator for Emacs 19.
 
-;; Copyright (C) 1993, 1994, 1995 Free Software Foundation, Inc.
+;; Copyright (C) 1993, 1994, 1995, 1996 Free Software Foundation, Inc.
 
 ;; Author: Jim Thompson <thompson@wg2.waii.com>
+;; Maintainer: FSF
 ;; Keywords: print, PostScript
 
 ;; This file is part of GNU Emacs.
@@ -1167,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
@@ -1805,7 +1808,10 @@ EndDSCPage\n"))
 
 (defun ps-generate (buffer from to genfunc)
   (let ((from (min to from))
-       (to (max to from)))
+       (to (max to from))
+       ;; This avoids trouble if chars with read-only properties
+       ;; are copied into ps-spool-buffer.
+       (inhibit-read-only t))
     (save-restriction
       (narrow-to-region from to)
       (if ps-razzle-dazzle