Commit e088c02a authored by Glenn Morris's avatar Glenn Morris
Browse files

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.
parent 9d794026
2010-10-29 Glenn Morris <rgm@gnu.org>
 
* files.el (temporary-file-directory): Remove (already defined in C).
* cus-start.el: Add temporary-file-directory.
* abbrev.el (abbrev-mode):
* composite.el (auto-composition-mode):
* menu-bar.el (menu-bar-mode):
......
......@@ -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")
......
......@@ -188,32 +188,6 @@ If the buffer is visiting a new file, the value is nil.")
"Non-nil if visited file was read-only when visited.")
(make-variable-buffer-local 'buffer-file-read-only)
(defcustom temporary-file-directory
(file-name-as-directory
;; FIXME ? Should there be Ftemporary_file_directory to do the
;; following 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")
(let ((tmp (ignore-errors (shell-command-to-string ; bug#7135
"getconf DARWIN_USER_TEMP_DIR"))))
(and (stringp tmp)
(setq tmp (replace-regexp-in-string "\n\\'" "" tmp))
;; This handles "getconf: Unrecognized variable..."
(file-directory-p tmp)
tmp))
"/tmp"))
(t
(or (getenv "TMPDIR") (getenv "TMP") (getenv "TEMP") "/tmp"))))
"The directory for writing temporary files."
:group 'files
;; Darwin section added 24.1, does not seem worth :version bump.
:initialize 'custom-initialize-delay
:type 'directory)
(defcustom small-temporary-file-directory
(if (eq system-type 'ms-dos) (getenv "TMPDIR"))
"The directory for writing small temporary files.
......@@ -6470,5 +6444,4 @@ Otherwise, trash FILENAME using the freedesktop.org conventions,
(define-key ctl-x-5-map "r" 'find-file-read-only-other-frame)
(define-key ctl-x-5-map "\C-o" 'display-buffer-other-frame)
;; arch-tag: bc68d3ea-19ca-468b-aac6-3a4a7766101f
;;; files.el ends here
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment