*** /tmp/tramp.el.~1~ Wed Mar 19 15:52:46 2008 --- /tmp/tramp.el Wed Mar 19 15:52:46 2008 *************** *** 1957,1974 **** (put 'with-connection-property 'edebug-form-spec t) (font-lock-add-keywords 'emacs-lisp-mode '("\\")) - ;;;###autoload - (defmacro tramp-let-maybe (variable value &rest body) - "Let-bind VARIABLE to VALUE in BODY, but only if VARIABLE is not obsolete. - BODY is executed whether or not the variable is obsolete. - The intent is to protect against `obsolete variable' warnings." - `(if (get ',variable 'byte-obsolete-variable) - (progn ,@body) - (let ((,variable ,value)) - ,@body))) - (put 'tramp-let-maybe 'lisp-indent-function 2) - (put 'tramp-let-maybe 'edebug-form-spec t) - (defsubst tramp-make-tramp-temp-file (vec) "Create a temporary file on the remote host identified by VEC. Return the local name of the temporary file." --- 1957,1962 ---- *************** *** 2201,2209 **** "Like `file-truename' for Tramp files." (with-parsed-tramp-file-name (expand-file-name filename) nil (with-file-property v localname "file-truename" ! (let* ((steps (tramp-split-string localname "/")) ! (localnamedir (tramp-let-maybe directory-sep-char ?/ ;for XEmacs ! (file-name-as-directory localname))) (is-dir (string= localname localnamedir)) (thisstep nil) (numchase 0) --- 2189,2197 ---- "Like `file-truename' for Tramp files." (with-parsed-tramp-file-name (expand-file-name filename) nil (with-file-property v localname "file-truename" ! (let* ((directory-sep-char ?/) ;for XEmacs ! (steps (tramp-split-string localname "/")) ! (localnamedir (file-name-as-directory localname)) (is-dir (string= localname localnamedir)) (thisstep nil) (numchase 0) *************** *** 3557,3569 **** ;; would otherwise use backslash. `default-directory' is ;; bound, because on Windows there would be problems with UNC ;; shares or Cygwin mounts. ! (tramp-let-maybe directory-sep-char ?/ ! (let ((default-directory (tramp-compat-temporary-file-directory))) ! (tramp-make-tramp-file-name ! method user host ! (tramp-drop-volume-letter ! (tramp-run-real-handler 'expand-file-name ! (list localname))))))))) (defun tramp-handle-substitute-in-file-name (filename) "Like `substitute-in-file-name' for Tramp files. --- 3545,3557 ---- ;; would otherwise use backslash. `default-directory' is ;; bound, because on Windows there would be problems with UNC ;; shares or Cygwin mounts. ! (let ((directory-sep-char ?/) ! (default-directory (tramp-compat-temporary-file-directory))) ! (tramp-make-tramp-file-name ! method user host ! (tramp-drop-volume-letter ! (tramp-run-real-handler 'expand-file-name ! (list localname)))))))) (defun tramp-handle-substitute-in-file-name (filename) "Like `substitute-in-file-name' for Tramp files. *************** *** 4497,4507 **** Falls back to normal file name handler if no Tramp file name handler exists." ;; We bind `directory-sep-char' here for XEmacs on Windows, which ;; would otherwise use backslash. ! (tramp-let-maybe directory-sep-char ?/ ! (let ((fn (assoc operation tramp-completion-file-name-handler-alist))) ! (if fn ! (save-match-data (apply (cdr fn) args)) ! (tramp-completion-run-real-handler operation args)))))) ;;;###autoload (defsubst tramp-register-file-name-handler () --- 4485,4495 ---- Falls back to normal file name handler if no Tramp file name handler exists." ;; We bind `directory-sep-char' here for XEmacs on Windows, which ;; would otherwise use backslash. ! (let ((directory-sep-char ?/) ! (fn (assoc operation tramp-completion-file-name-handler-alist))) ! (if fn ! (save-match-data (apply (cdr fn) args)) ! (tramp-completion-run-real-handler operation args))))) ;;;###autoload (defsubst tramp-register-file-name-handler ()