emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] emacs/lisp/net tramp.el


From: Michael Albinus
Subject: [Emacs-diffs] emacs/lisp/net tramp.el
Date: Thu, 15 Oct 2009 13:15:17 +0000

CVSROOT:        /sources/emacs
Module name:    emacs
Changes by:     Michael Albinus <albinus>       09/10/15 13:15:17

Modified files:
        lisp/net       : tramp.el 

Log message:
        * net/tramp.el (tramp-replace-environment-variables): Do not fail
        if the environment variable does not exist.

CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/emacs/lisp/net/tramp.el?cvsroot=emacs&r1=1.261&r2=1.262

Patches:
Index: tramp.el
===================================================================
RCS file: /sources/emacs/emacs/lisp/net/tramp.el,v
retrieving revision 1.261
retrieving revision 1.262
diff -u -b -r1.261 -r1.262
--- tramp.el    11 Oct 2009 13:59:28 -0000      1.261
+++ tramp.el    15 Oct 2009 13:15:16 -0000      1.262
@@ -3922,9 +3922,11 @@
   "Replace environment variables in FILENAME.
 Return the string with the replaced variables."
   (save-match-data
-    (let ((idx (string-match "$\\w+" filename)))
+    (let ((idx (string-match "$\\(\\w+\\)" filename)))
       ;; `$' is coded as `$$'.
-      (when (and idx (or (zerop idx) (not (eq ?$ (aref filename (1- idx))))))
+      (when (and idx
+                (or (zerop idx) (not (eq ?$ (aref filename (1- idx)))))
+                (getenv (match-string 1 filename)))
        (setq filename
              (replace-match
               (substitute-in-file-name (match-string 0 filename))




reply via email to

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