diff options
| author | Glenn Morris | 2010-10-28 23:51:36 -0700 |
|---|---|---|
| committer | Glenn Morris | 2010-10-28 23:51:36 -0700 |
| commit | e088c02a81d502ef52cb494d6b73238b94861e3a (patch) | |
| tree | aaa7a716b660ea4b7d97919b8b8babd83ff45a76 | |
| parent | 9d7940260552d9ad5f331443aae200094ae2847c (diff) | |
| download | emacs-e088c02a81d502ef52cb494d6b73238b94861e3a.tar.gz emacs-e088c02a81d502ef52cb494d6b73238b94861e3a.zip | |
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.
| -rw-r--r-- | lisp/ChangeLog | 3 | ||||
| -rw-r--r-- | lisp/cus-start.el | 29 | ||||
| -rw-r--r-- | lisp/files.el | 27 |
3 files changed, 32 insertions, 27 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog index d40db8cf573..4842d677fb4 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog | |||
| @@ -1,5 +1,8 @@ | |||
| 1 | 2010-10-29 Glenn Morris <rgm@gnu.org> | 1 | 2010-10-29 Glenn Morris <rgm@gnu.org> |
| 2 | 2 | ||
| 3 | * files.el (temporary-file-directory): Remove (already defined in C). | ||
| 4 | * cus-start.el: Add temporary-file-directory. | ||
| 5 | |||
| 3 | * abbrev.el (abbrev-mode): | 6 | * abbrev.el (abbrev-mode): |
| 4 | * composite.el (auto-composition-mode): | 7 | * composite.el (auto-composition-mode): |
| 5 | * menu-bar.el (menu-bar-mode): | 8 | * menu-bar.el (menu-bar-mode): |
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 | |||
| 174 | ;; fileio.c | 174 | ;; fileio.c |
| 175 | (delete-by-moving-to-trash auto-save boolean "23.1") | 175 | (delete-by-moving-to-trash auto-save boolean "23.1") |
| 176 | (auto-save-visited-file-name auto-save boolean) | 176 | (auto-save-visited-file-name auto-save boolean) |
| 177 | ;; filelock.c | ||
| 178 | (temporary-file-directory | ||
| 179 | ;; Darwin section added 24.1, does not seem worth :version bump. | ||
| 180 | files directory nil | ||
| 181 | (file-name-as-directory | ||
| 182 | ;; FIXME ? Should there be Ftemporary_file_directory to do this | ||
| 183 | ;; more robustly (cf set_local_socket in emacsclient.c). | ||
| 184 | ;; It could be used elsewhere, eg Fcall_process_region, | ||
| 185 | ;; server-socket-dir. See bug#7135. | ||
| 186 | (cond ((memq system-type '(ms-dos windows-nt)) | ||
| 187 | (or (getenv "TEMP") (getenv "TMPDIR") (getenv "TMP") | ||
| 188 | "c:/temp")) | ||
| 189 | ((eq system-type 'darwin) | ||
| 190 | (or (getenv "TMPDIR") (getenv "TMP") (getenv "TEMP") | ||
| 191 | ;; See bug#7135. | ||
| 192 | (let ((tmp (ignore-errors | ||
| 193 | (shell-command-to-string | ||
| 194 | "getconf DARWIN_USER_TEMP_DIR")))) | ||
| 195 | (and (stringp tmp) | ||
| 196 | (setq tmp (replace-regexp-in-string | ||
| 197 | "\n\\'" "" tmp)) | ||
| 198 | ;; Handles "getconf: Unrecognized variable..." | ||
| 199 | (file-directory-p tmp) | ||
| 200 | tmp)) | ||
| 201 | "/tmp")) | ||
| 202 | (t | ||
| 203 | (or (getenv "TMPDIR") (getenv "TMP") (getenv "TEMP") | ||
| 204 | "/tmp")))) | ||
| 205 | :initialize custom-initialize-delay) | ||
| 177 | ;; fns.c | 206 | ;; fns.c |
| 178 | (use-dialog-box menu boolean "21.1") | 207 | (use-dialog-box menu boolean "21.1") |
| 179 | (use-file-dialog menu boolean "22.1") | 208 | (use-file-dialog menu boolean "22.1") |
diff --git a/lisp/files.el b/lisp/files.el index d5f60b7817d..0c5640d13a4 100644 --- a/lisp/files.el +++ b/lisp/files.el | |||
| @@ -188,32 +188,6 @@ If the buffer is visiting a new file, the value is nil.") | |||
| 188 | "Non-nil if visited file was read-only when visited.") | 188 | "Non-nil if visited file was read-only when visited.") |
| 189 | (make-variable-buffer-local 'buffer-file-read-only) | 189 | (make-variable-buffer-local 'buffer-file-read-only) |
| 190 | 190 | ||
| 191 | (defcustom temporary-file-directory | ||
| 192 | (file-name-as-directory | ||
| 193 | ;; FIXME ? Should there be Ftemporary_file_directory to do the | ||
| 194 | ;; following more robustly (cf set_local_socket in emacsclient.c). | ||
| 195 | ;; It could be used elsewhere, eg Fcall_process_region, server-socket-dir. | ||
| 196 | ;; See bug#7135. | ||
| 197 | (cond ((memq system-type '(ms-dos windows-nt)) | ||
| 198 | (or (getenv "TEMP") (getenv "TMPDIR") (getenv "TMP") "c:/temp")) | ||
| 199 | ((eq system-type 'darwin) | ||
| 200 | (or (getenv "TMPDIR") (getenv "TMP") (getenv "TEMP") | ||
| 201 | (let ((tmp (ignore-errors (shell-command-to-string ; bug#7135 | ||
| 202 | "getconf DARWIN_USER_TEMP_DIR")))) | ||
| 203 | (and (stringp tmp) | ||
| 204 | (setq tmp (replace-regexp-in-string "\n\\'" "" tmp)) | ||
| 205 | ;; This handles "getconf: Unrecognized variable..." | ||
| 206 | (file-directory-p tmp) | ||
| 207 | tmp)) | ||
| 208 | "/tmp")) | ||
| 209 | (t | ||
| 210 | (or (getenv "TMPDIR") (getenv "TMP") (getenv "TEMP") "/tmp")))) | ||
| 211 | "The directory for writing temporary files." | ||
| 212 | :group 'files | ||
| 213 | ;; Darwin section added 24.1, does not seem worth :version bump. | ||
| 214 | :initialize 'custom-initialize-delay | ||
| 215 | :type 'directory) | ||
| 216 | |||
| 217 | (defcustom small-temporary-file-directory | 191 | (defcustom small-temporary-file-directory |
| 218 | (if (eq system-type 'ms-dos) (getenv "TMPDIR")) | 192 | (if (eq system-type 'ms-dos) (getenv "TMPDIR")) |
| 219 | "The directory for writing small temporary files. | 193 | "The directory for writing small temporary files. |
| @@ -6470,5 +6444,4 @@ Otherwise, trash FILENAME using the freedesktop.org conventions, | |||
| 6470 | (define-key ctl-x-5-map "r" 'find-file-read-only-other-frame) | 6444 | (define-key ctl-x-5-map "r" 'find-file-read-only-other-frame) |
| 6471 | (define-key ctl-x-5-map "\C-o" 'display-buffer-other-frame) | 6445 | (define-key ctl-x-5-map "\C-o" 'display-buffer-other-frame) |
| 6472 | 6446 | ||
| 6473 | ;; arch-tag: bc68d3ea-19ca-468b-aac6-3a4a7766101f | ||
| 6474 | ;;; files.el ends here | 6447 | ;;; files.el ends here |