2564 |
(save-excursion |
(save-excursion |
2565 |
(set-buffer trampbuf) (erase-buffer) |
(set-buffer trampbuf) (erase-buffer) |
2566 |
(insert-file-contents-literally filename) |
(insert-file-contents-literally filename) |
2567 |
(let ((coding-system-for-write 'no-conversion)) |
;; We don't want the target file to be compressed, so we let-bind |
2568 |
|
;; `jka-compr-inhibit' to t. |
2569 |
|
(let ((coding-system-for-write 'no-conversion) |
2570 |
|
(jka-compr-inhibit t)) |
2571 |
(write-region (point-min) (point-max) newname))) |
(write-region (point-min) (point-max) newname))) |
2572 |
;; If the operation was `rename', delete the original file. |
;; If the operation was `rename', delete the original file. |
2573 |
(unless (eq op 'copy) |
(unless (eq op 'copy) |
3070 |
(signal 'file-error |
(signal 'file-error |
3071 |
(format "File `%s' not found on remote host" filename)) |
(format "File `%s' not found on remote host" filename)) |
3072 |
(list (expand-file-name filename) 0)) |
(list (expand-file-name filename) 0)) |
3073 |
(let ((local-copy (file-local-copy filename)) |
;; `insert-file-contents-literally' takes care to avoid calling |
3074 |
|
;; jka-compr. By let-binding inhibit-file-name-operation, we |
3075 |
|
;; propagate that care to the file-local-copy operation. |
3076 |
|
(let ((local-copy |
3077 |
|
(let ((inhibit-file-name-operation 'file-local-copy)) |
3078 |
|
(file-local-copy filename))) |
3079 |
(coding-system-used nil) |
(coding-system-used nil) |
3080 |
(result nil)) |
(result nil)) |
3081 |
(when visit |
(when visit |