emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] Changes to emacs/lisp/net/tramp.el,v


From: Michael Albinus
Subject: [Emacs-diffs] Changes to emacs/lisp/net/tramp.el,v
Date: Mon, 05 Mar 2007 06:42:00 +0000

CVSROOT:        /sources/emacs
Module name:    emacs
Changes by:     Michael Albinus <albinus>       07/03/05 06:41:59

Index: net/tramp.el
===================================================================
RCS file: /sources/emacs/emacs/lisp/net/tramp.el,v
retrieving revision 1.122
retrieving revision 1.123
diff -u -b -r1.122 -r1.123
--- net/tramp.el        28 Feb 2007 22:22:20 -0000      1.122
+++ net/tramp.el        5 Mar 2007 06:41:59 -0000       1.123
@@ -3771,10 +3771,12 @@
 
 ;; File Editing.
 
-(defsubst tramp-make-temp-file ()
+(defsubst tramp-make-temp-file (filename)
+  (concat
   (funcall (if (fboundp 'make-temp-file) 'make-temp-file 'make-temp-name)
           (expand-file-name tramp-temp-name-prefix
-                            (tramp-temporary-file-directory))))
+                             (tramp-temporary-file-directory)))
+   (file-name-extension filename t)))
 
 (defun tramp-handle-file-local-copy (filename)
   "Like `file-local-copy' for tramp files."
@@ -3794,7 +3796,7 @@
       (unless (file-exists-p filename)
        (error "Cannot make local copy of non-existing file `%s'"
               filename))
-      (setq tmpfil (tramp-make-temp-file))
+      (setq tmpfil (tramp-make-temp-file filename))
 
       (cond ((tramp-method-out-of-band-p multi-method method user host)
             ;; `copy-file' handles out-of-band methods
@@ -3846,7 +3848,7 @@
                     (kill-buffer tmpbuf))
                 ;; If tramp-decoding-function is not defined for this
                 ;; method, we invoke tramp-decoding-command instead.
-                (let ((tmpfil2 (tramp-make-temp-file)))
+                (let ((tmpfil2 (tramp-make-temp-file filename)))
                   (write-region (point-min) (point-max) tmpfil2)
                   (tramp-message
                    6 "Decoding remote file %s with command %s..."
@@ -4053,7 +4055,7 @@
       ;; Write region into a tmp file.  This isn't really needed if we
       ;; use an encoding function, but currently we use it always
       ;; because this makes the logic simpler.
-      (setq tmpfil (tramp-make-temp-file))
+      (setq tmpfil (tramp-make-temp-file filename))
       ;; Set current buffer.  If connection wasn't open, `file-modes' has
       ;; changed it accidently.
       (set-buffer curbuf)




reply via email to

[Prev in Thread] Current Thread [Next in Thread]