# HG changeset patch # User Chong Yidong # Date 1234043807 0 # Node ID 575496a152c7e550839bf7255744a945e79560b7 # Parent f0b9a6d7b5e4cef2faf603492716c705e9eb9536 (ps-run-tmp-dir): Doc fix. (ps-run-make-tmp-filename): Use temporary-file-directory. diff -r f0b9a6d7b5e4 -r 575496a152c7 lisp/progmodes/ps-mode.el --- a/lisp/progmodes/ps-mode.el Sat Feb 07 21:56:37 2009 +0000 +++ b/lisp/progmodes/ps-mode.el Sat Feb 07 21:56:47 2009 +0000 @@ -181,12 +181,7 @@ (defcustom ps-run-tmp-dir nil "*Name of directory to place temporary file. - -If nil, the following are tried in turn, until success: - 1. \"$TEMP\" - 2. \"$TMP\" - 3. \"$HOME/tmp\" - 4. \"/tmp\"" +If nil, use `temporary-file-directory'." :group 'PostScript-interaction :type '(choice (const nil) directory)) @@ -1124,24 +1119,10 @@ (defun ps-run-make-tmp-filename () (unless ps-mode-tmp-file - (cond (ps-run-tmp-dir) - ((setq ps-run-tmp-dir (getenv "TEMP"))) - ((setq ps-run-tmp-dir (getenv "TMP"))) - ((setq ps-run-tmp-dir (getenv "HOME")) - (setq - ps-run-tmp-dir - (concat (file-name-as-directory ps-run-tmp-dir) "tmp")) - (unless (file-directory-p ps-run-tmp-dir) - (setq ps-run-tmp-dir nil)))) - (unless ps-run-tmp-dir - (setq ps-run-tmp-dir "/tmp")) (setq ps-mode-tmp-file - (make-temp-file - (concat - (if ps-run-tmp-dir - (file-name-as-directory ps-run-tmp-dir) - "") - "ps-run-")))) + (let ((temporary-file-directory (or ps-run-tmp-dir + temporary-file-directory))) + (make-temp-file "ps-run-")))) ps-mode-tmp-file) ;; Remove temporary file