diff options
author | Glenn Morris <rgm@gnu.org> | 2010-10-28 23:51:36 -0700 |
---|---|---|
committer | Glenn Morris <rgm@gnu.org> | 2010-10-28 23:51:36 -0700 |
commit | e088c02a81d502ef52cb494d6b73238b94861e3a (patch) | |
tree | aaa7a716b660ea4b7d97919b8b8babd83ff45a76 /lisp/cus-start.el | |
parent | 9d7940260552d9ad5f331443aae200094ae2847c (diff) | |
download | emacs-e088c02a81d502ef52cb494d6b73238b94861e3a.tar.gz |
Remove duplicate Lisp definition of temporary-file-directory, from filelock.c.
* lisp/files.el (temporary-file-directory): Remove (already defined in C).
* lisp/cus-start.el: Add temporary-file-directory.
Diffstat (limited to 'lisp/cus-start.el')
-rw-r--r-- | lisp/cus-start.el | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/lisp/cus-start.el b/lisp/cus-start.el index 8fa20d624dd..90291fc9229 100644 --- a/lisp/cus-start.el +++ b/lisp/cus-start.el @@ -174,6 +174,35 @@ Leaving \"Default\" unchecked is equivalent with specifying a default of ;; fileio.c (delete-by-moving-to-trash auto-save boolean "23.1") (auto-save-visited-file-name auto-save boolean) + ;; filelock.c + (temporary-file-directory + ;; Darwin section added 24.1, does not seem worth :version bump. + files directory nil + (file-name-as-directory + ;; FIXME ? Should there be Ftemporary_file_directory to do this + ;; more robustly (cf set_local_socket in emacsclient.c). + ;; It could be used elsewhere, eg Fcall_process_region, + ;; server-socket-dir. See bug#7135. + (cond ((memq system-type '(ms-dos windows-nt)) + (or (getenv "TEMP") (getenv "TMPDIR") (getenv "TMP") + "c:/temp")) + ((eq system-type 'darwin) + (or (getenv "TMPDIR") (getenv "TMP") (getenv "TEMP") + ;; See bug#7135. + (let ((tmp (ignore-errors + (shell-command-to-string + "getconf DARWIN_USER_TEMP_DIR")))) + (and (stringp tmp) + (setq tmp (replace-regexp-in-string + "\n\\'" "" tmp)) + ;; Handles "getconf: Unrecognized variable..." + (file-directory-p tmp) + tmp)) + "/tmp")) + (t + (or (getenv "TMPDIR") (getenv "TMP") (getenv "TEMP") + "/tmp")))) + :initialize custom-initialize-delay) ;; fns.c (use-dialog-box menu boolean "21.1") (use-file-dialog menu boolean "22.1") |