aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorVinicius Jose Latorre2004-09-27 04:26:15 +0000
committerVinicius Jose Latorre2004-09-27 04:26:15 +0000
commitb1f6fa86ec4ce5923370af8e703b68baeea2cc87 (patch)
tree0b9633495edda52c9d4fc42f255aa6021d15e39d
parentf646e5bee8b50421bf27481e5eb04f8c28bf1020 (diff)
downloademacs-b1f6fa86ec4ce5923370af8e703b68baeea2cc87.tar.gz
emacs-b1f6fa86ec4ce5923370af8e703b68baeea2cc87.zip
Check if file exists before deleting it.
-rw-r--r--lisp/ChangeLog9
-rw-r--r--lisp/printing.el26
2 files changed, 23 insertions, 12 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index 9ec6580675d..107daad1d8b 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,3 +1,12 @@
12004-09-26 Vinicius Jose Latorre <viniciusjl@ig.com.br>
2
3 * printing.el: Doc fix.
4 (pr-version): New version number (6.8.1).
5 (pr-ps-file-using-ghostscript): Use make-temp-file instead of
6 make-temp-name.
7 (pr-delete-file): Check if file exists before deleting it. Reported by
8 Lennart Borgman <lennart.borgman.073@student.lu.se>.
9
12004-09-26 Stefan <monnier@iro.umontreal.ca> 102004-09-26 Stefan <monnier@iro.umontreal.ca>
2 11
3 * term.el (term-display-table): New variable. 12 * term.el (term-display-table): New variable.
diff --git a/lisp/printing.el b/lisp/printing.el
index a406e09b8c0..3efb53111fd 100644
--- a/lisp/printing.el
+++ b/lisp/printing.el
@@ -5,13 +5,13 @@
5 5
6;; Author: Vinicius Jose Latorre <viniciusjl@ig.com.br> 6;; Author: Vinicius Jose Latorre <viniciusjl@ig.com.br>
7;; Maintainer: Vinicius Jose Latorre <viniciusjl@ig.com.br> 7;; Maintainer: Vinicius Jose Latorre <viniciusjl@ig.com.br>
8;; Time-stamp: <2004/09/21 22:51:58 vinicius> 8;; Time-stamp: <2004/09/26 22:11:24 vinicius>
9;; Keywords: wp, print, PostScript 9;; Keywords: wp, print, PostScript
10;; Version: 6.8 10;; Version: 6.8.1
11;; X-URL: http://www.cpqd.com.br/~vinicius/emacs/ 11;; X-URL: http://www.cpqd.com.br/~vinicius/emacs/
12 12
13(defconst pr-version "6.8" 13(defconst pr-version "6.8.1"
14 "printing.el, v 6.8 <2004/09/21 vinicius> 14 "printing.el, v 6.8.1 <2004/09/26 vinicius>
15 15
16Please send all bug fixes and enhancements to 16Please send all bug fixes and enhancements to
17 Vinicius Jose Latorre <viniciusjl@ig.com.br> 17 Vinicius Jose Latorre <viniciusjl@ig.com.br>
@@ -125,16 +125,16 @@ Please send all bug fixes and enhancements to
125;; Novices (First Users) 125;; Novices (First Users)
126;; --------------------- 126;; ---------------------
127;; 127;;
128;; First of all, take a glance of printing documentation only to have an idea 128;; First of all, see printing documentation only to get an idea of what
129;; of what `printing' is capable. 129;; `printing' is capable.
130;; 130;;
131;; Then try to set the variables: `pr-ps-name', `pr-ps-printer-alist', 131;; Then try to set the variables: `pr-ps-name', `pr-ps-printer-alist',
132;; `pr-txt-name', `pr-txt-printer-alist' and `pr-path-alist'. These variables 132;; `pr-txt-name', `pr-txt-printer-alist' and `pr-path-alist'. These variables
133;; are the main variables for printing processing. 133;; are the main variables for printing processing.
134;; 134;;
135;; Now, please, see these variables documentation more in deep. You can do 135;; Now, please, see these variables documentation deeper. You can do this by
136;; this by typing C-h v pr-ps-name RET (for example) if you already loaded 136;; typing C-h v pr-ps-name RET (for example) if you already loaded printing
137;; printing package, or by browsing printing.el source file. 137;; package, or by browsing printing.el source file.
138;; 138;;
139;; If the documentation isn't clear or if you find a way to improve the 139;; If the documentation isn't clear or if you find a way to improve the
140;; documentation, please, send an email to maintainer. All printing users 140;; documentation, please, send an email to maintainer. All printing users
@@ -263,7 +263,8 @@ Please send all bug fixes and enhancements to
263;; in Windows. The gsprint utility is faster than ghostscript to print 263;; in Windows. The gsprint utility is faster than ghostscript to print
264;; monochrome PostScript. 264;; monochrome PostScript.
265;; 265;;
266;; The efficiency is similar to print non-monochrome PostScript file. 266;; To print non-monochrome PostScript file, the efficiency of ghostscript
267;; is similar to gsprint.
267;; 268;;
268;; Also the gsprint utility comes together with gsview distribution. 269;; Also the gsprint utility comes together with gsview distribution.
269;; 270;;
@@ -3887,7 +3888,7 @@ image in a file with that name."
3887 (interactive (list (pr-ps-infile-preprint "Print preview "))) 3888 (interactive (list (pr-ps-infile-preprint "Print preview ")))
3888 (and (stringp filename) (file-exists-p filename) 3889 (and (stringp filename) (file-exists-p filename)
3889 (let* ((file (pr-expand-file-name filename)) 3890 (let* ((file (pr-expand-file-name filename))
3890 (tempfile (pr-dosify-file-name (make-temp-name file)))) 3891 (tempfile (pr-dosify-file-name (make-temp-file file))))
3891 ;; gs use 3892 ;; gs use
3892 (pr-call-process pr-gs-command 3893 (pr-call-process pr-gs-command
3893 (format "-sDEVICE=%s" pr-gs-device) 3894 (format "-sDEVICE=%s" pr-gs-device)
@@ -5221,7 +5222,8 @@ non-nil."
5221 5222
5222 5223
5223(defun pr-delete-file (file) 5224(defun pr-delete-file (file)
5224 (and pr-delete-temp-file (delete-file file))) 5225 (and pr-delete-temp-file (file-exists-p file)
5226 (delete-file file)))
5225 5227
5226 5228
5227(defun pr-expand-file-name (filename) 5229(defun pr-expand-file-name (filename)