comparison lisp/ediff-util.el @ 26039:fb6b9c37cdc4

Use make-temp-file.
author Stefan Monnier <monnier@iro.umontreal.ca>
date Fri, 15 Oct 1999 16:03:59 +0000
parents 4b1d22478c9f
children 4f315ca65976
comparison
equal deleted inserted replaced
26038:2f34f175497c 26039:fb6b9c37cdc4
2920 ((find-file-name-handler f 'find-file-noselect) 2920 ((find-file-name-handler f 'find-file-noselect)
2921 ;; to thwart file handlers in write-region, e.g., if file 2921 ;; to thwart file handlers in write-region, e.g., if file
2922 ;; name ends with .Z or .gz 2922 ;; name ends with .Z or .gz
2923 ;; This is needed so that patches produced by ediff will 2923 ;; This is needed so that patches produced by ediff will
2924 ;; have more meaningful names 2924 ;; have more meaningful names
2925 (make-temp-name short-f)) 2925 (make-temp-file short-f))
2926 ;; Prefix is most often the same as the file name for the 2926 ;; Prefix is most often the same as the file name for the
2927 ;; variant. Here we are trying to use the original file name 2927 ;; variant. Here we are trying to use the original file name
2928 ;; but in the temp directory. 2928 ;; but in the temp directory.
2929 ((and prefix (not (file-exists-p f))) f) 2929 ((and prefix (not (file-exists-p f))) f)
2930 ;; If a file with the orig name exists, add some random stuff 2930 ;; If a file with the orig name exists, add some random stuff
2931 ;; to it. 2931 ;; to it.
2932 (t (make-temp-name short-f)))) 2932 (t (make-temp-file short-f))))
2933 2933
2934 ;; create the file 2934 ;; create the file
2935 (ediff-with-current-buffer buff 2935 (ediff-with-current-buffer buff
2936 (write-region (if start start (point-min)) 2936 (write-region (if start start (point-min))
2937 (if end end (point-max)) 2937 (if end end (point-max))