diff options
| author | Michael Albinus | 2007-03-05 06:41:59 +0000 |
|---|---|---|
| committer | Michael Albinus | 2007-03-05 06:41:59 +0000 |
| commit | bba31a09c8142439a135e9f43433f1c301eb863f (patch) | |
| tree | 1188e8c15f203c2fe0462c17fcff462c2d3628e0 | |
| parent | 47ccd97c33558027db6b7bbd2f103871fde6f46a (diff) | |
| download | emacs-bba31a09c8142439a135e9f43433f1c301eb863f.tar.gz emacs-bba31a09c8142439a135e9f43433f1c301eb863f.zip | |
* net/tramp.el (tramp-make-temp-file): New parameter FILENAME.
Append its extension to the resulting temporary file name.
(tramp-handle-file-local-copy, tramp-handle-write-region): Apply
it.
* net/tramp-smb.el (tramp-smb-handle-file-local-copy)
(tramp-smb-handle-write-region): Apply it.
| -rw-r--r-- | lisp/ChangeLog | 12 | ||||
| -rw-r--r-- | lisp/net/tramp-smb.el | 4 | ||||
| -rw-r--r-- | lisp/net/tramp.el | 16 |
3 files changed, 22 insertions, 10 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog index ee2eb652ec4..9918a658a13 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog | |||
| @@ -1,6 +1,16 @@ | |||
| 1 | 2007-03-05 Michael Albinus <michael.albinus@gmx.de> | ||
| 2 | |||
| 3 | * net/tramp.el (tramp-make-temp-file): New parameter FILENAME. | ||
| 4 | Append its extension to the resulting temporary file name. | ||
| 5 | (tramp-handle-file-local-copy, tramp-handle-write-region): Apply | ||
| 6 | it. | ||
| 7 | |||
| 8 | * net/tramp-smb.el (tramp-smb-handle-file-local-copy) | ||
| 9 | (tramp-smb-handle-write-region): Apply it. | ||
| 10 | |||
| 1 | 2007-03-05 Alin C. Soare <alinsoar@voila.fr> (tiny change) | 11 | 2007-03-05 Alin C. Soare <alinsoar@voila.fr> (tiny change) |
| 2 | 12 | ||
| 3 | * emacs-lisp/lisp-mode.el (calculate-lisp-indent): | 13 | * emacs-lisp/lisp-mode.el (calculate-lisp-indent): |
| 4 | Redo previous change. | 14 | Redo previous change. |
| 5 | 15 | ||
| 6 | 2007-03-04 Kevin Rodgers <kevin.d.rodgers@gmail.com> | 16 | 2007-03-04 Kevin Rodgers <kevin.d.rodgers@gmail.com> |
diff --git a/lisp/net/tramp-smb.el b/lisp/net/tramp-smb.el index dfe6216043e..5d5d441193d 100644 --- a/lisp/net/tramp-smb.el +++ b/lisp/net/tramp-smb.el | |||
| @@ -384,7 +384,7 @@ KEEP-DATE is not handled in case NEWNAME resides on an SMB server." | |||
| 384 | (save-excursion | 384 | (save-excursion |
| 385 | (let ((share (tramp-smb-get-share localname)) | 385 | (let ((share (tramp-smb-get-share localname)) |
| 386 | (file (tramp-smb-get-localname localname t)) | 386 | (file (tramp-smb-get-localname localname t)) |
| 387 | (tmpfil (tramp-make-temp-file))) | 387 | (tmpfil (tramp-make-temp-file filename))) |
| 388 | (unless (file-exists-p filename) | 388 | (unless (file-exists-p filename) |
| 389 | (error "Cannot make local copy of non-existing file `%s'" filename)) | 389 | (error "Cannot make local copy of non-existing file `%s'" filename)) |
| 390 | (tramp-message-for-buffer | 390 | (tramp-message-for-buffer |
| @@ -595,7 +595,7 @@ Catches errors for shares like \"C$/\", which are common in Microsoft Windows." | |||
| 595 | (curbuf (current-buffer)) | 595 | (curbuf (current-buffer)) |
| 596 | tmpfil) | 596 | tmpfil) |
| 597 | ;; Write region into a tmp file. | 597 | ;; Write region into a tmp file. |
| 598 | (setq tmpfil (tramp-make-temp-file)) | 598 | (setq tmpfil (tramp-make-temp-file filename)) |
| 599 | ;; We say `no-message' here because we don't want the visited file | 599 | ;; We say `no-message' here because we don't want the visited file |
| 600 | ;; modtime data to be clobbered from the temp file. We call | 600 | ;; modtime data to be clobbered from the temp file. We call |
| 601 | ;; `set-visited-file-modtime' ourselves later on. | 601 | ;; `set-visited-file-modtime' ourselves later on. |
diff --git a/lisp/net/tramp.el b/lisp/net/tramp.el index 602c6d25eaa..7ff9b2d956b 100644 --- a/lisp/net/tramp.el +++ b/lisp/net/tramp.el | |||
| @@ -3771,10 +3771,12 @@ This will break if COMMAND prints a newline, followed by the value of | |||
| 3771 | 3771 | ||
| 3772 | ;; File Editing. | 3772 | ;; File Editing. |
| 3773 | 3773 | ||
| 3774 | (defsubst tramp-make-temp-file () | 3774 | (defsubst tramp-make-temp-file (filename) |
| 3775 | (funcall (if (fboundp 'make-temp-file) 'make-temp-file 'make-temp-name) | 3775 | (concat |
| 3776 | (expand-file-name tramp-temp-name-prefix | 3776 | (funcall (if (fboundp 'make-temp-file) 'make-temp-file 'make-temp-name) |
| 3777 | (tramp-temporary-file-directory)))) | 3777 | (expand-file-name tramp-temp-name-prefix |
| 3778 | (tramp-temporary-file-directory))) | ||
| 3779 | (file-name-extension filename t))) | ||
| 3778 | 3780 | ||
| 3779 | (defun tramp-handle-file-local-copy (filename) | 3781 | (defun tramp-handle-file-local-copy (filename) |
| 3780 | "Like `file-local-copy' for tramp files." | 3782 | "Like `file-local-copy' for tramp files." |
| @@ -3794,7 +3796,7 @@ This will break if COMMAND prints a newline, followed by the value of | |||
| 3794 | (unless (file-exists-p filename) | 3796 | (unless (file-exists-p filename) |
| 3795 | (error "Cannot make local copy of non-existing file `%s'" | 3797 | (error "Cannot make local copy of non-existing file `%s'" |
| 3796 | filename)) | 3798 | filename)) |
| 3797 | (setq tmpfil (tramp-make-temp-file)) | 3799 | (setq tmpfil (tramp-make-temp-file filename)) |
| 3798 | 3800 | ||
| 3799 | (cond ((tramp-method-out-of-band-p multi-method method user host) | 3801 | (cond ((tramp-method-out-of-band-p multi-method method user host) |
| 3800 | ;; `copy-file' handles out-of-band methods | 3802 | ;; `copy-file' handles out-of-band methods |
| @@ -3846,7 +3848,7 @@ This will break if COMMAND prints a newline, followed by the value of | |||
| 3846 | (kill-buffer tmpbuf)) | 3848 | (kill-buffer tmpbuf)) |
| 3847 | ;; If tramp-decoding-function is not defined for this | 3849 | ;; If tramp-decoding-function is not defined for this |
| 3848 | ;; method, we invoke tramp-decoding-command instead. | 3850 | ;; method, we invoke tramp-decoding-command instead. |
| 3849 | (let ((tmpfil2 (tramp-make-temp-file))) | 3851 | (let ((tmpfil2 (tramp-make-temp-file filename))) |
| 3850 | (write-region (point-min) (point-max) tmpfil2) | 3852 | (write-region (point-min) (point-max) tmpfil2) |
| 3851 | (tramp-message | 3853 | (tramp-message |
| 3852 | 6 "Decoding remote file %s with command %s..." | 3854 | 6 "Decoding remote file %s with command %s..." |
| @@ -4053,7 +4055,7 @@ Returns a file name in `tramp-auto-save-directory' for autosaving this file." | |||
| 4053 | ;; Write region into a tmp file. This isn't really needed if we | 4055 | ;; Write region into a tmp file. This isn't really needed if we |
| 4054 | ;; use an encoding function, but currently we use it always | 4056 | ;; use an encoding function, but currently we use it always |
| 4055 | ;; because this makes the logic simpler. | 4057 | ;; because this makes the logic simpler. |
| 4056 | (setq tmpfil (tramp-make-temp-file)) | 4058 | (setq tmpfil (tramp-make-temp-file filename)) |
| 4057 | ;; Set current buffer. If connection wasn't open, `file-modes' has | 4059 | ;; Set current buffer. If connection wasn't open, `file-modes' has |
| 4058 | ;; changed it accidently. | 4060 | ;; changed it accidently. |
| 4059 | (set-buffer curbuf) | 4061 | (set-buffer curbuf) |