aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--lisp/ChangeLog37
-rw-r--r--lisp/net/tramp-compat.el2
-rw-r--r--lisp/net/tramp-fish.el14
-rw-r--r--lisp/net/tramp-ftp.el2
-rw-r--r--lisp/net/tramp-gvfs.el6
-rw-r--r--lisp/net/tramp-imap.el3
-rw-r--r--lisp/net/tramp-smb.el12
-rw-r--r--lisp/net/tramp.el37
8 files changed, 75 insertions, 38 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index bc80b4cafe0..2ef684ad12e 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,3 +1,40 @@
12010-05-28 Michael Albinus <michael.albinus@gmx.de>
2
3 * net/tramp-compat.el (tramp-compat-delete-file): Use
4 `symbol-value' for backward compatibility.
5
6 * net/tramp.el (tramp-handle-make-symbolic-link)
7 (tramp-handle-load)
8 (tramp-do-copy-or-rename-file-via-buffer)
9 (tramp-do-copy-or-rename-file-directly)
10 (tramp-do-copy-or-rename-file-out-of-band)
11 (tramp-handle-process-file, tramp-handle-call-process-region)
12 (tramp-handle-shell-command, tramp-handle-file-local-copy)
13 (tramp-handle-insert-file-contents, tramp-handle-write-region)
14 (tramp-delete-temp-file-function): Use `delete-file' instead
15 of `tramp-compat-delete-file'.
16
17 * net/tramp-fish.el (tramp-fish-handle-delete-directory)
18 (tramp-fish-handle-make-symbolic-link)
19 (tramp-fish-handle-process-file): Use `delete-file' instead
20 of `tramp-compat-delete-file'.
21
22 * net/tramp-ftp.el (tramp-ftp-file-name-handler): Use
23 `delete-file' instead of `tramp-compat-delete-file'.
24
25 * net/tramp-gvfs.el (tramp-gvfs-handle-delete-file): Rename arg.
26 (tramp-gvfs-handle-write-region): Use `delete-file' instead of
27 `tramp-compat-delete-file'.
28
29 * net/tramp-imap.el (tramp-imap-do-copy-or-rename-file): Use
30 `delete-file' instead of `tramp-compat-delete-file'.
31
32 * net/tramp-smb.el (tramp-smb-handle-copy-file)
33 (tramp-smb-handle-file-local-copy, tramp-smb-handle-rename-file)
34 (tramp-smb-handle-write-region): Use `delete-file' instead of
35 `tramp-compat-delete-file'.
36 (tramp-smb-handle-delete-directory): Use 'trash as arg.
37
12010-05-27 Chong Yidong <cyd@stupidchicken.com> 382010-05-27 Chong Yidong <cyd@stupidchicken.com>
2 39
3 * dired.el (dired-delete-file): New arg TRASH. 40 * dired.el (dired-delete-file): New arg TRASH.
diff --git a/lisp/net/tramp-compat.el b/lisp/net/tramp-compat.el
index 530a8693490..a1ec3c9b89d 100644
--- a/lisp/net/tramp-compat.el
+++ b/lisp/net/tramp-compat.el
@@ -343,7 +343,7 @@ Add the extension of FILENAME, if existing."
343 (wrong-number-of-arguments 343 (wrong-number-of-arguments
344 (let ((delete-by-moving-to-trash 344 (let ((delete-by-moving-to-trash
345 (and (boundp 'delete-by-moving-to-trash) 345 (and (boundp 'delete-by-moving-to-trash)
346 delete-by-moving-to-trash 346 (symbol-value 'delete-by-moving-to-trash)
347 trash))) 347 trash)))
348 (delete-file filename))))) 348 (delete-file filename)))))
349 349
diff --git a/lisp/net/tramp-fish.el b/lisp/net/tramp-fish.el
index db5c8ad0b48..632b400e2b3 100644
--- a/lisp/net/tramp-fish.el
+++ b/lisp/net/tramp-fish.el
@@ -326,14 +326,14 @@ pass to the OPERATION."
326 (lambda (file) 326 (lambda (file)
327 (if (file-directory-p file) 327 (if (file-directory-p file)
328 (tramp-compat-delete-directory file recursive) 328 (tramp-compat-delete-directory file recursive)
329 (tramp-compat-delete-file file))) 329 (delete-file file)))
330 ;; We do not want to delete "." and "..". 330 ;; We do not want to delete "." and "..".
331 (directory-files 331 (directory-files
332 directory 'full "^\\([^.]\\|\\.\\([^.]\\|\\..\\)\\).*"))) 332 directory 'full "^\\([^.]\\|\\.\\([^.]\\|\\..\\)\\).*")))
333 (with-parsed-tramp-file-name 333 (with-parsed-tramp-file-name
334 (directory-file-name (expand-file-name directory)) nil 334 (directory-file-name (expand-file-name directory)) nil
335 (tramp-flush-directory-property v localname) 335 (tramp-flush-directory-property v localname)
336 (tramp-fish-send-command-and-check v (format "#RMD %s" localname))))) 336 (tramp-fish-send-command-and-check v (format "#RMD %s" localname)))))
337 337
338(defun tramp-fish-handle-delete-file (filename &optional trash) 338(defun tramp-fish-handle-delete-file (filename &optional trash)
339 "Like `delete-file' for Tramp files." 339 "Like `delete-file' for Tramp files."
@@ -660,7 +660,7 @@ target of the symlink differ."
660 localname))))) 660 localname)))))
661 (tramp-error 661 (tramp-error
662 v 'file-already-exists "File %s already exists" localname) 662 v 'file-already-exists "File %s already exists" localname)
663 (tramp-compat-delete-file linkname))) 663 (delete-file linkname)))
664 664
665 ;; If FILENAME is a Tramp name, use just the localname component. 665 ;; If FILENAME is a Tramp name, use just the localname component.
666 (when (tramp-tramp-file-p filename) 666 (when (tramp-tramp-file-p filename)
@@ -839,8 +839,8 @@ target of the symlink differ."
839 ;; Provide error file. 839 ;; Provide error file.
840 (when tmpstderr (rename-file tmpstderr (cadr destination) t)) 840 (when tmpstderr (rename-file tmpstderr (cadr destination) t))
841 ;; Cleanup. 841 ;; Cleanup.
842 (when tmpinput (tramp-compat-delete-file tmpinput)) 842 (when tmpinput (delete-file tmpinput))
843 (when tmpoutput (tramp-compat-delete-file tmpoutput)) 843 (when tmpoutput (delete-file tmpoutput))
844 ;; Return exit status. 844 ;; Return exit status.
845 ret))) 845 ret)))
846 846
diff --git a/lisp/net/tramp-ftp.el b/lisp/net/tramp-ftp.el
index ca421cbaaa6..4c373cbcd82 100644
--- a/lisp/net/tramp-ftp.el
+++ b/lisp/net/tramp-ftp.el
@@ -182,7 +182,7 @@ pass to the OPERATION."
182 (unwind-protect 182 (unwind-protect
183 (rename-file tmpfile newname (car args)) 183 (rename-file tmpfile newname (car args))
184 ;; Cleanup. 184 ;; Cleanup.
185 (ignore-errors (tramp-compat-delete-file tmpfile))))) 185 (ignore-errors (delete-file tmpfile)))))
186 186
187 ;; Normally, the handlers must be discarded. 187 ;; Normally, the handlers must be discarded.
188 ;; `inhibit-file-name-handlers' isn't sufficient, because the 188 ;; `inhibit-file-name-handlers' isn't sufficient, because the
diff --git a/lisp/net/tramp-gvfs.el b/lisp/net/tramp-gvfs.el
index 25dae77544d..f62eca8922b 100644
--- a/lisp/net/tramp-gvfs.el
+++ b/lisp/net/tramp-gvfs.el
@@ -533,9 +533,9 @@ is no information where to trace the message.")
533 (tramp-compat-delete-directory 533 (tramp-compat-delete-directory
534 (tramp-gvfs-fuse-file-name directory) recursive)) 534 (tramp-gvfs-fuse-file-name directory) recursive))
535 535
536(defun tramp-gvfs-handle-delete-file (filename &optional tramp) 536(defun tramp-gvfs-handle-delete-file (filename &optional trash)
537 "Like `delete-file' for Tramp files." 537 "Like `delete-file' for Tramp files."
538 (tramp-compat-delete-file (tramp-gvfs-fuse-file-name filename) tramp)) 538 (tramp-compat-delete-file (tramp-gvfs-fuse-file-name filename) trash))
539 539
540(defun tramp-gvfs-handle-directory-files 540(defun tramp-gvfs-handle-directory-files
541 (directory &optional full match nosort) 541 (directory &optional full match nosort)
@@ -742,7 +742,7 @@ is no information where to trace the message.")
742 "gvfs-save" tmpfile (tramp-get-buffer v) nil 742 "gvfs-save" tmpfile (tramp-get-buffer v) nil
743 (tramp-gvfs-url-file-name filename))) 743 (tramp-gvfs-url-file-name filename)))
744 (signal (car err) (cdr err))) 744 (signal (car err) (cdr err)))
745 (tramp-compat-delete-file tmpfile))))) 745 (delete-file tmpfile)))))
746 746
747 ;; Set file modification time. 747 ;; Set file modification time.
748 (when (or (eq visit t) (stringp visit)) 748 (when (or (eq visit t) (stringp visit))
diff --git a/lisp/net/tramp-imap.el b/lisp/net/tramp-imap.el
index de8e58e7491..3e8883d2e07 100644
--- a/lisp/net/tramp-imap.el
+++ b/lisp/net/tramp-imap.el
@@ -267,8 +267,7 @@ of `copy' and `rename'."
267 (insert-file-contents filename) 267 (insert-file-contents filename)
268 (write-region (point-min) (point-max) newname))))) 268 (write-region (point-min) (point-max) newname)))))
269 269
270 (when (eq op 'rename) 270 (when (eq op 'rename) (delete-file filename))))
271 (tramp-compat-delete-file filename))))
272 271
273;; TODO: revise this much 272;; TODO: revise this much
274(defun tramp-imap-handle-expand-file-name (name &optional dir) 273(defun tramp-imap-handle-expand-file-name (name &optional dir)
diff --git a/lisp/net/tramp-smb.el b/lisp/net/tramp-smb.el
index 54cccb49053..9c4d991d0e1 100644
--- a/lisp/net/tramp-smb.el
+++ b/lisp/net/tramp-smb.el
@@ -345,7 +345,7 @@ PRESERVE-UID-GID is completely ignored."
345 (condition-case err 345 (condition-case err
346 (rename-file tmpfile newname ok-if-already-exists) 346 (rename-file tmpfile newname ok-if-already-exists)
347 ((error quit) 347 ((error quit)
348 (tramp-compat-delete-file tmpfile) 348 (delete-file tmpfile)
349 (signal (car err) (cdr err)))) 349 (signal (car err) (cdr err))))
350 350
351 ;; Remote newname. 351 ;; Remote newname.
@@ -382,7 +382,7 @@ PRESERVE-UID-GID is completely ignored."
382 (lambda (file) 382 (lambda (file)
383 (if (file-directory-p file) 383 (if (file-directory-p file)
384 (tramp-compat-delete-directory file recursive) 384 (tramp-compat-delete-directory file recursive)
385 (tramp-compat-delete-file file t))) 385 (tramp-compat-delete-file file 'trash)))
386 ;; We do not want to delete "." and "..". 386 ;; We do not want to delete "." and "..".
387 (directory-files 387 (directory-files
388 directory 'full "^\\([^.]\\|\\.\\([^.]\\|\\..\\)\\).*"))) 388 directory 'full "^\\([^.]\\|\\.\\([^.]\\|\\..\\)\\).*")))
@@ -611,7 +611,7 @@ PRESERVE-UID-GID is completely ignored."
611 v (format "get \"%s\" \"%s\"" 611 v (format "get \"%s\" \"%s\""
612 (tramp-smb-get-localname v) tmpfile)) 612 (tramp-smb-get-localname v) tmpfile))
613 ;; Oops, an error. We shall cleanup. 613 ;; Oops, an error. We shall cleanup.
614 (tramp-compat-delete-file tmpfile) 614 (delete-file tmpfile)
615 (tramp-error 615 (tramp-error
616 v 'file-error "Cannot make local copy of file `%s'" filename))) 616 v 'file-error "Cannot make local copy of file `%s'" filename)))
617 tmpfile))) 617 tmpfile)))
@@ -861,7 +861,7 @@ target of the symlink differ."
861 (condition-case err 861 (condition-case err
862 (rename-file tmpfile newname ok-if-already-exists) 862 (rename-file tmpfile newname ok-if-already-exists)
863 ((error quit) 863 ((error quit)
864 (tramp-compat-delete-file tmpfile) 864 (delete-file tmpfile)
865 (signal (car err) (cdr err)))) 865 (signal (car err) (cdr err))))
866 866
867 ;; Remote newname. 867 ;; Remote newname.
@@ -882,7 +882,7 @@ target of the symlink differ."
882 filename (tramp-smb-get-localname v))) 882 filename (tramp-smb-get-localname v)))
883 (tramp-error v 'file-error "Cannot rename `%s'" filename))))) 883 (tramp-error v 'file-error "Cannot rename `%s'" filename)))))
884 884
885 (tramp-compat-delete-file filename))) 885 (delete-file filename)))
886 886
887(defun tramp-smb-handle-set-file-modes (filename mode) 887(defun tramp-smb-handle-set-file-modes (filename mode)
888 "Like `set-file-modes' for Tramp files." 888 "Like `set-file-modes' for Tramp files."
@@ -946,7 +946,7 @@ errors for shares like \"C$/\", which are common in Microsoft Windows."
946 v (format "put %s \"%s\"" 946 v (format "put %s \"%s\""
947 tmpfile (tramp-smb-get-localname v))) 947 tmpfile (tramp-smb-get-localname v)))
948 (tramp-error v 'file-error "Cannot write `%s'" filename)) 948 (tramp-error v 'file-error "Cannot write `%s'" filename))
949 (tramp-compat-delete-file tmpfile))) 949 (delete-file tmpfile)))
950 950
951 (unless (equal curbuf (current-buffer)) 951 (unless (equal curbuf (current-buffer))
952 (tramp-error 952 (tramp-error
diff --git a/lisp/net/tramp.el b/lisp/net/tramp.el
index a1aed599ae9..c3db23d7bf2 100644
--- a/lisp/net/tramp.el
+++ b/lisp/net/tramp.el
@@ -2544,7 +2544,7 @@ target of the symlink differ."
2544 l-localname))))) 2544 l-localname)))))
2545 (tramp-error 2545 (tramp-error
2546 l 'file-already-exists "File %s already exists" l-localname) 2546 l 'file-already-exists "File %s already exists" l-localname)
2547 (tramp-compat-delete-file linkname))) 2547 (delete-file linkname)))
2548 2548
2549 ;; If FILENAME is a Tramp name, use just the localname component. 2549 ;; If FILENAME is a Tramp name, use just the localname component.
2550 (when (tramp-tramp-file-p filename) 2550 (when (tramp-tramp-file-p filename)
@@ -2593,7 +2593,7 @@ target of the symlink differ."
2593 ;; MUST-SUFFIX doesn't exist on XEmacs, so let it default to nil. 2593 ;; MUST-SUFFIX doesn't exist on XEmacs, so let it default to nil.
2594 (unwind-protect 2594 (unwind-protect
2595 (load local-copy noerror t t) 2595 (load local-copy noerror t t)
2596 (tramp-compat-delete-file local-copy))))) 2596 (delete-file local-copy)))))
2597 t))) 2597 t)))
2598 2598
2599;; Localname manipulation functions that grok Tramp localnames... 2599;; Localname manipulation functions that grok Tramp localnames...
@@ -3769,7 +3769,7 @@ KEEP-DATE is non-nil if NEWNAME should have the same timestamp as FILENAME."
3769 ;; Set the mode. 3769 ;; Set the mode.
3770 (set-file-modes newname (tramp-default-file-modes filename)) 3770 (set-file-modes newname (tramp-default-file-modes filename))
3771 ;; If the operation was `rename', delete the original file. 3771 ;; If the operation was `rename', delete the original file.
3772 (unless (eq op 'copy) (tramp-compat-delete-file filename))) 3772 (unless (eq op 'copy) (delete-file filename)))
3773 3773
3774(defun tramp-do-copy-or-rename-file-directly 3774(defun tramp-do-copy-or-rename-file-directly
3775 (op filename newname ok-if-already-exists keep-date preserve-uid-gid) 3775 (op filename newname ok-if-already-exists keep-date preserve-uid-gid)
@@ -3924,7 +3924,7 @@ the uid and gid from FILENAME."
3924 3924
3925 ;; Save exit. 3925 ;; Save exit.
3926 (condition-case nil 3926 (condition-case nil
3927 (tramp-compat-delete-file tmpfile) 3927 (delete-file tmpfile)
3928 (error))))))))) 3928 (error)))))))))
3929 3929
3930 ;; Set the time and mode. Mask possible errors. 3930 ;; Set the time and mode. Mask possible errors.
@@ -3964,7 +3964,7 @@ The method used must be an out-of-band method."
3964 (if dir-flag 3964 (if dir-flag
3965 (tramp-compat-delete-directory 3965 (tramp-compat-delete-directory
3966 (expand-file-name ".." tmpfile) 'recursive) 3966 (expand-file-name ".." tmpfile) 'recursive)
3967 (tramp-compat-delete-file tmpfile)) 3967 (delete-file tmpfile))
3968 (error)))) 3968 (error))))
3969 3969
3970 ;; Expand hops. Might be necessary for gateway methods. 3970 ;; Expand hops. Might be necessary for gateway methods.
@@ -4082,7 +4082,7 @@ The method used must be an out-of-band method."
4082 ;; If the operation was `rename', delete the original file. 4082 ;; If the operation was `rename', delete the original file.
4083 (unless (eq op 'copy) 4083 (unless (eq op 'copy)
4084 (if (file-regular-p filename) 4084 (if (file-regular-p filename)
4085 (tramp-compat-delete-file filename) 4085 (delete-file filename)
4086 (tramp-compat-delete-directory filename 'recursive)))))) 4086 (tramp-compat-delete-directory filename 'recursive))))))
4087 4087
4088(defun tramp-handle-make-directory (dir &optional parents) 4088(defun tramp-handle-make-directory (dir &optional parents)
@@ -4114,6 +4114,7 @@ The method used must be an out-of-band method."
4114 4114
4115(defun tramp-handle-delete-file (filename &optional trash) 4115(defun tramp-handle-delete-file (filename &optional trash)
4116 "Like `delete-file' for Tramp files." 4116 "Like `delete-file' for Tramp files."
4117 ;; TRASH needs to be implemented. See `move-file-to-trash'.
4117 (setq filename (expand-file-name filename)) 4118 (setq filename (expand-file-name filename))
4118 (with-parsed-tramp-file-name filename nil 4119 (with-parsed-tramp-file-name filename nil
4119 (tramp-flush-file-property v (file-name-directory localname)) 4120 (tramp-flush-file-property v (file-name-directory localname))
@@ -4629,7 +4630,7 @@ beginning of local filename are not substituted."
4629 4630
4630 ;; Cleanup. We remove all file cache values for the connection, 4631 ;; Cleanup. We remove all file cache values for the connection,
4631 ;; because the remote process could have changed them. 4632 ;; because the remote process could have changed them.
4632 (when tmpinput (tramp-compat-delete-file tmpinput)) 4633 (when tmpinput (delete-file tmpinput))
4633 4634
4634 ;; `process-file-side-effects' has been introduced with GNU 4635 ;; `process-file-side-effects' has been introduced with GNU
4635 ;; Emacs 23.2. If set to `nil', no remote file will be changed 4636 ;; Emacs 23.2. If set to `nil', no remote file will be changed
@@ -4666,7 +4667,7 @@ Lisp error raised when PROGRAM is nil is trapped also, returning 1."
4666 (when delete (delete-region start end)) 4667 (when delete (delete-region start end))
4667 (unwind-protect 4668 (unwind-protect
4668 (apply 'call-process program tmpfile buffer display args) 4669 (apply 'call-process program tmpfile buffer display args)
4669 (tramp-compat-delete-file tmpfile)))) 4670 (delete-file tmpfile))))
4670 4671
4671(defun tramp-handle-shell-command 4672(defun tramp-handle-shell-command
4672 (command &optional output-buffer error-buffer) 4673 (command &optional output-buffer error-buffer)
@@ -4731,7 +4732,7 @@ Lisp error raised when PROGRAM is nil is trapped also, returning 1."
4731 (when (listp buffer) 4732 (when (listp buffer)
4732 (with-current-buffer error-buffer 4733 (with-current-buffer error-buffer
4733 (insert-file-contents (cadr buffer))) 4734 (insert-file-contents (cadr buffer)))
4734 (tramp-compat-delete-file (cadr buffer))) 4735 (delete-file (cadr buffer)))
4735 (if current-buffer-p 4736 (if current-buffer-p
4736 ;; This is like exchange-point-and-mark, but doesn't 4737 ;; This is like exchange-point-and-mark, but doesn't
4737 ;; activate the mark. It is cleaner to avoid activation, 4738 ;; activate the mark. It is cleaner to avoid activation,
@@ -4813,7 +4814,7 @@ Lisp error raised when PROGRAM is nil is trapped also, returning 1."
4813 (unwind-protect 4814 (unwind-protect
4814 (tramp-call-local-coding-command 4815 (tramp-call-local-coding-command
4815 loc-dec tmpfile2 tmpfile) 4816 loc-dec tmpfile2 tmpfile)
4816 (tramp-compat-delete-file tmpfile2))))) 4817 (delete-file tmpfile2)))))
4817 4818
4818 ;; Set proper permissions. 4819 ;; Set proper permissions.
4819 (set-file-modes tmpfile (tramp-default-file-modes filename)) 4820 (set-file-modes tmpfile (tramp-default-file-modes filename))
@@ -4826,7 +4827,7 @@ Lisp error raised when PROGRAM is nil is trapped also, returning 1."
4826 4827
4827 ;; Error handling. 4828 ;; Error handling.
4828 ((error quit) 4829 ((error quit)
4829 (tramp-compat-delete-file tmpfile) 4830 (delete-file tmpfile)
4830 (signal (car err) (cdr err)))) 4831 (signal (car err) (cdr err))))
4831 4832
4832 (run-hooks 'tramp-handle-file-local-copy-hook) 4833 (run-hooks 'tramp-handle-file-local-copy-hook)
@@ -4961,9 +4962,9 @@ coding system might not be determined. This function repairs it."
4961 (set-buffer-modified-p nil)) 4962 (set-buffer-modified-p nil))
4962 (when (and (stringp local-copy) 4963 (when (and (stringp local-copy)
4963 (or remote-copy (null tramp-temp-buffer-file-name))) 4964 (or remote-copy (null tramp-temp-buffer-file-name)))
4964 (tramp-compat-delete-file local-copy)) 4965 (delete-file local-copy))
4965 (when (stringp remote-copy) 4966 (when (stringp remote-copy)
4966 (tramp-compat-delete-file 4967 (delete-file
4967 (tramp-make-tramp-file-name method user host remote-copy)))))) 4968 (tramp-make-tramp-file-name method user host remote-copy))))))
4968 4969
4969 ;; Result. 4970 ;; Result.
@@ -5154,7 +5155,7 @@ Returns a file name in `tramp-auto-save-directory' for autosaving this file."
5154 (list start end tmpfile append 'no-message lockname confirm)) 5155 (list start end tmpfile append 'no-message lockname confirm))
5155 ((error quit) 5156 ((error quit)
5156 (setq tramp-temp-buffer-file-name nil) 5157 (setq tramp-temp-buffer-file-name nil)
5157 (tramp-compat-delete-file tmpfile) 5158 (delete-file tmpfile)
5158 (signal (car err) (cdr err)))) 5159 (signal (car err) (cdr err))))
5159 5160
5160 ;; Now, `last-coding-system-used' has the right value. Remember it. 5161 ;; Now, `last-coding-system-used' has the right value. Remember it.
@@ -5198,13 +5199,13 @@ Returns a file name in `tramp-auto-save-directory' for autosaving this file."
5198 (copy-file tmpfile filename t) 5199 (copy-file tmpfile filename t)
5199 ((error quit) 5200 ((error quit)
5200 (setq tramp-temp-buffer-file-name nil) 5201 (setq tramp-temp-buffer-file-name nil)
5201 (tramp-compat-delete-file tmpfile) 5202 (delete-file tmpfile)
5202 (signal (car err) (cdr err))))) 5203 (signal (car err) (cdr err)))))
5203 (setq tramp-temp-buffer-file-name nil) 5204 (setq tramp-temp-buffer-file-name nil)
5204 ;; Don't rename, in order to keep context in SELinux. 5205 ;; Don't rename, in order to keep context in SELinux.
5205 (unwind-protect 5206 (unwind-protect
5206 (copy-file tmpfile filename t) 5207 (copy-file tmpfile filename t)
5207 (tramp-compat-delete-file tmpfile)))) 5208 (delete-file tmpfile))))
5208 5209
5209 ;; Use inline file transfer. 5210 ;; Use inline file transfer.
5210 (rem-dec 5211 (rem-dec
@@ -5289,7 +5290,7 @@ Returns a file name in `tramp-auto-save-directory' for autosaving this file."
5289 filename rem-dec))))) 5290 filename rem-dec)))))
5290 5291
5291 ;; Save exit. 5292 ;; Save exit.
5292 (tramp-compat-delete-file tmpfile))) 5293 (delete-file tmpfile)))
5293 5294
5294 ;; That's not expected. 5295 ;; That's not expected.
5295 (t 5296 (t
@@ -6372,7 +6373,7 @@ hosts, or files, disagree."
6372 "Remove temporary files related to current buffer." 6373 "Remove temporary files related to current buffer."
6373 (when (stringp tramp-temp-buffer-file-name) 6374 (when (stringp tramp-temp-buffer-file-name)
6374 (condition-case nil 6375 (condition-case nil
6375 (tramp-compat-delete-file tramp-temp-buffer-file-name) 6376 (delete-file tramp-temp-buffer-file-name)
6376 (error nil)))) 6377 (error nil))))
6377 6378
6378(add-hook 'kill-buffer-hook 'tramp-delete-temp-file-function) 6379(add-hook 'kill-buffer-hook 'tramp-delete-temp-file-function)