]> code.delx.au - gnu-emacs/blobdiff - lisp/net/tramp-compat.el
Merge from emacs--rel--22
[gnu-emacs] / lisp / net / tramp-compat.el
index fcd8ba112b56f03ad9464175fb7b5cedc4d63006..0f66ee2183d0795a80960fc0f0d8f99bf077096b 100644 (file)
@@ -153,11 +153,12 @@ this is the function `temp-directory'."
 (defsubst tramp-compat-make-temp-file (filename)
   "Create a temporary file (compat function).
 Add the extension of FILENAME, if existing."
-  (let ((prefix (expand-file-name
-                (symbol-value 'tramp-temp-name-prefix)
-                (tramp-compat-temporary-file-directory)))
-       (extension (file-name-extension filename t))
-       result)
+  (let* (file-name-handler-alist
+        (prefix (expand-file-name
+                 (symbol-value 'tramp-temp-name-prefix)
+                 (tramp-compat-temporary-file-directory)))
+        (extension (file-name-extension filename t))
+        result)
     (condition-case nil
        (setq result
              (funcall (symbol-function 'make-temp-file) prefix nil extension))
@@ -197,6 +198,7 @@ Add the extension of FILENAME, if existing."
   (cond
    ((or (null id-format) (eq id-format 'integer))
     (file-attributes filename))
+   ;; FIXME: shouldn't that be tramp-file-p or somesuch?
    ((file-remote-p filename)
     (funcall (symbol-function 'tramp-handle-file-attributes)
             filename id-format))
@@ -216,9 +218,9 @@ Add the extension of FILENAME, if existing."
     (copy-file filename newname ok-if-already-exists keep-date)))
 
 ;; `copy-tree' is a built-in function in XEmacs.  In Emacs 21, it is
-;; an auoloaded function in cl-extra.el.  Since Emacs 22, it is part
+;; an autoloaded function in cl-extra.el.  Since Emacs 22, it is part
 ;; of subr.el.  There are problems when autoloading, therefore we test
-;; for for `subrp' and `symbol-file'.  Implementation is taken from Emacs23.
+;; for `subrp' and `symbol-file'.  Implementation is taken from Emacs23.
 (defun tramp-compat-copy-tree (tree)
   "Make a copy of TREE (compat function)."
   (if (or (subrp 'copy-tree) (symbol-file 'copy-tree))