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-smb.el,v


From: Michael Albinus
Subject: [Emacs-diffs] Changes to emacs/lisp/net/tramp-smb.el,v
Date: Wed, 03 Oct 2007 10:54:05 +0000

CVSROOT:        /sources/emacs
Module name:    emacs
Changes by:     Michael Albinus <albinus>       07/10/03 10:54:04

Index: net/tramp-smb.el
===================================================================
RCS file: /sources/emacs/emacs/lisp/net/tramp-smb.el,v
retrieving revision 1.32
retrieving revision 1.33
diff -u -b -r1.32 -r1.33
--- net/tramp-smb.el    30 Sep 2007 16:43:07 -0000      1.32
+++ net/tramp-smb.el    3 Oct 2007 10:54:03 -0000       1.33
@@ -32,11 +32,6 @@
 (require 'tramp-cache)
 (require 'tramp-compat)
 
-;; Pacify byte-compiler
-(eval-when-compile
-  (require 'cl)
-  (require 'custom))
-
 ;; Define SMB method ...
 (defcustom tramp-smb-method "smb"
   "*Method to connect SAMBA and M$ SMB servers."
@@ -376,19 +371,19 @@
   "Like `file-local-copy' for Tramp files."
   (with-parsed-tramp-file-name filename nil
     (let ((file (tramp-smb-get-localname localname t))
-         (tmpfil (tramp-make-temp-file filename)))
+         (tmpfile (tramp-make-temp-file filename)))
       (unless (file-exists-p filename)
        (tramp-error
         v 'file-error
         "Cannot make local copy of non-existing file `%s'" filename))
-      (tramp-message v 4 "Fetching %s to tmp file %s..." filename tmpfil)
-      (if (tramp-smb-send-command v (format "get \"%s\" %s" file tmpfil))
+      (tramp-message v 4 "Fetching %s to tmp file %s..." filename tmpfile)
+      (if (tramp-smb-send-command v (format "get \"%s\" %s" file tmpfile))
          (tramp-message
-          v 4 "Fetching %s to tmp file %s...done" filename tmpfil)
+          v 4 "Fetching %s to tmp file %s...done" filename tmpfile)
        (tramp-error
         v 'file-error
         "Cannot make local copy of file `%s'" filename))
-      tmpfil)))
+      tmpfile)))
 
 ;; This function should return "foo/" for directories and "bar" for
 ;; files.
@@ -580,7 +575,7 @@
     (unless (eq append nil)
       (tramp-error
         v 'file-error "Cannot append to file using tramp (`%s')" filename))
-    ;; XEmacs takes a coding system as the seventh argument, not `confirm'
+    ;; XEmacs takes a coding system as the seventh argument, not `confirm'.
     (when (and (not (featurep 'xemacs))
               confirm (file-exists-p filename))
       (unless (y-or-n-p (format "File %s exists; overwrite anyway? "
@@ -592,25 +587,23 @@
     (tramp-flush-file-property v localname)
     (let ((file (tramp-smb-get-localname localname t))
          (curbuf (current-buffer))
-         tmpfil)
-      ;; Write region into a tmp file.
-      (setq tmpfil (tramp-make-temp-file filename))
+         (tmpfile (tramp-make-temp-file filename)))
       ;; We say `no-message' here because we don't want the visited file
       ;; modtime data to be clobbered from the temp file.  We call
       ;; `set-visited-file-modtime' ourselves later on.
       (tramp-run-real-handler
        'write-region
        (if confirm ; don't pass this arg unless defined for backward compat.
-          (list start end tmpfil append 'no-message lockname confirm)
-        (list start end tmpfil append 'no-message lockname)))
+          (list start end tmpfile append 'no-message lockname confirm)
+        (list start end tmpfile append 'no-message lockname)))
 
-      (tramp-message v 5 "Writing tmp file %s to file %s..." tmpfil filename)
-      (if (tramp-smb-send-command v (format "put %s \"%s\"" tmpfil file))
+      (tramp-message v 5 "Writing tmp file %s to file %s..." tmpfile filename)
+      (if (tramp-smb-send-command v (format "put %s \"%s\"" tmpfile file))
          (tramp-message
-          v 5 "Writing tmp file %s to file %s...done" tmpfil filename)
+          v 5 "Writing tmp file %s to file %s...done" tmpfile filename)
        (tramp-error v 'file-error "Cannot write `%s'" filename))
 
-      (delete-file tmpfil)
+      (delete-file tmpfile)
       (unless (equal curbuf (current-buffer))
        (tramp-error
         v 'file-error




reply via email to

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