* lisp/files.el (temporary-file-directory): Remove (already defined in C).
* lisp/cus-start.el: Add temporary-file-directory.
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):
;; 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")
"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.
(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