>>>> "Lars" == Lars Magne Ingebrigtsen
<larsi(a)ifi.uio.no> writes:
Lars> Emacs has temporary-file-directory, which defaults to "/tmp/".
It's a
Lars> nice variable to have, since all other temp dir variables can use that
Lars> variable as the default value, so I think XEmacs should have it as well.
Seems reasonable. Here's the trivial untested patch:
1998-12-21 Martin Buchholz <martin(a)xemacs.org>
* files.el (temporary-file-directory): Add new variable,
compatible with FSF Emacs 20.3
--- etc/NEWS.old
+++ etc/NEWS
@@ -121,6 +121,11 @@
An extra bonus is that checking for circularities is not just
friendlier, but actually faster than checking for quit.
+** The new variable temporary-file-directory specifies the directory
+to use for creating temporary files. The default value is determined
+in a reasonable way for your operating system; on Unix systems it is
+based on the TMP and TMPDIR environment variables.
+
* Changes in XEmacs 21.0
========================
--- lisp/files.el.old
+++ lisp/files.el
@@ -354,6 +354,14 @@
(defalias 'lock-buffer 'ignore))
(or (fboundp 'unlock-buffer)
(defalias 'unlock-buffer 'ignore))
+
+(defvar temporary-file-directory
+ (file-name-as-directory
+ (if (memq system-type '(ms-dos windows-nt))
+ (or (getenv "TEMP") (getenv "TMPDIR") (getenv "TMP")
"c:/temp")
+ (or (getenv "TMPDIR") (getenv "TMP") (getenv "TEMP")
"/tmp")))
+ "The directory for writing temporary files.")
+
;;FSFmacs bastardized ange-ftp cruft
;; This hook function provides support for ange-ftp host name