]> code.delx.au - gnu-emacs/commitdiff
* net/tramp.el (tramp-replace-environment-variables): Remove it.
authorMichael Albinus <michael.albinus@gmx.de>
Mon, 28 Apr 2008 19:32:41 +0000 (19:32 +0000)
committerMichael Albinus <michael.albinus@gmx.de>
Mon, 28 Apr 2008 19:32:41 +0000 (19:32 +0000)
There is a more simple solution.
(tramp-file-name-handler): Apply `substitute-in-file-name' w/o
Tramp file name handlers.

lisp/ChangeLog
lisp/net/tramp.el

index 80aeddee9cea0074d3fef8f55eb6f6ed889f0bbc..673c28f021b0618c233641c728ddde06bab044f0 100644 (file)
@@ -1,3 +1,10 @@
+2008-04-28  Michael Albinus  <michael.albinus@gmx.de>
+
+       * net/tramp.el (tramp-replace-environment-variables): Remove it.
+       There is a more simple solution.
+       (tramp-file-name-handler): Apply `substitute-in-file-name' w/o
+       Tramp file name handlers.
+
 2008-04-28  Nick Roberts  <nickrob@snap.net.nz>
 
        * progmodes/gdb-ui.el (gdb-info-breakpoints-custom): Make breakpoint
index 98eb93aa208a8da4a1cc78adda3d5ae465fbd626..5b2c9525b25e36cd1703a777635f96f22fb676bb 100644 (file)
@@ -4375,16 +4375,6 @@ ARGS are the arguments OPERATION has been called with."
          (setq res (cdr elt))))
       res)))
 
-(defun tramp-replace-environment-variables (filename)
-  "Replace environment variables in FILENAME.
-Return the string with the replaced variables."
-  (when (string-match "$\\w+" filename)
-    (setq filename
-         (replace-match
-          (substitute-in-file-name (match-string 0 filename))
-          t nil filename)))
-  filename)
-
 ;; Main function.
 ;;;###autoload
 (defun tramp-file-name-handler (operation &rest args)
@@ -4394,8 +4384,9 @@ Falls back to normal file name handler if no tramp file name handler exists."
 ;;  (edebug-trace "%s" (with-output-to-string (backtrace)))
   (save-match-data
     (let* ((filename
-           (tramp-replace-environment-variables
-            (apply 'tramp-file-name-for-operation operation args)))
+           (tramp-run-real-handler
+            'substitute-in-file-name
+            (list (apply 'tramp-file-name-for-operation operation args))))
           (completion (tramp-completion-mode-p filename))
           (foreign (tramp-find-foreign-file-name-handler filename)))
       (with-parsed-tramp-file-name filename nil