From: Michael Albinus Date: Sun, 5 Aug 2007 12:43:06 +0000 (+0000) Subject: * net/tramp.el (tramp-handle-file-remote-p): Return a string as X-Git-Tag: emacs-pretest-22.1.90~1105 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=6435918d3d459eba7c11d5cc4b0116285f196b28;p=emacs.git * net/tramp.el (tramp-handle-file-remote-p): Return a string as remote identification. --- diff --git a/lisp/ChangeLog b/lisp/ChangeLog index d07f01641c8..d3604800a02 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -3,6 +3,9 @@ * files.el (set-auto-mode): Handle also remote files wrt `auto-mode-alist'. + * net/tramp.el (tramp-handle-file-remote-p): Return a string as + remote identification. + 2007-08-04 Glenn Morris * autorevert.el (auto-revert-tail-mode): auto-revert-tail-pos is diff --git a/lisp/files.el b/lisp/files.el index 135ccfafb92..8e6fb9ff725 100644 --- a/lisp/files.el +++ b/lisp/files.el @@ -2260,7 +2260,7 @@ we don't actually set it to the same mode the buffer already has." (unless done (if buffer-file-name (let ((name buffer-file-name) - (remote-id (file-remote-p buffer-file-name))) + (remote-id (regexp-quote (file-remote-p buffer-file-name)))) ;; Remove remote file name identification. (when (and (stringp remote-id) (string-match remote-id name)) diff --git a/lisp/net/tramp.el b/lisp/net/tramp.el index 03e97b747da..9f665ca4707 100644 --- a/lisp/net/tramp.el +++ b/lisp/net/tramp.el @@ -3872,7 +3872,7 @@ This will break if COMMAND prints a newline, followed by the value of "Like `file-remote-p' for tramp files." (when (tramp-tramp-file-p filename) (with-parsed-tramp-file-name filename nil - (vector multi-method method user host "")))) + (tramp-make-tramp-file-name multi-method method user host "")))) (defun tramp-handle-insert-file-contents (filename &optional visit beg end replace)