comparison lisp/package-get.el @ 333:4f79e16b1112 r21-0-64

Import from CVS: tag r21-0-64
author cvs
date Mon, 13 Aug 2007 10:49:50 +0200
parents 58bac07dfa74
children fbbf69b4e8a7
comparison
equal deleted inserted replaced
332:bb75ebac9531 333:4f79e16b1112
939 "Return FILENAME as a remote filename. 939 "Return FILENAME as a remote filename.
940 It first checks if FILENAME already is a remote filename. If it is 940 It first checks if FILENAME already is a remote filename. If it is
941 not, then it uses the (car search) as the remote site-name and the (cadr 941 not, then it uses the (car search) as the remote site-name and the (cadr
942 search) as the remote-directory and concatenates filename. In other 942 search) as the remote-directory and concatenates filename. In other
943 words 943 words
944 site-name:remote-directory/filename 944 site-name:remote-directory/filename.
945
946 If (car search) is nil, (cadr search is interpreted as a local directory).
945 " 947 "
946 (if (efs-ftp-path filename) 948 (if (file-remote-p filename)
947 filename 949 filename
948 (let ((dir (cadr search))) 950 (let ((dir (cadr search)))
949 (concat (if (string-match "@" (car search)) 951 (concat (when (car search)
950 "/" 952 (concat
951 "/anonymous@") 953 (if (string-match "@" (car search))
952 (car search) ":" 954 "/"
955 "/anonymous@")
956 (car search) ":"))
953 (if (string-match "/$" dir) 957 (if (string-match "/$" dir)
954 dir 958 dir
955 (concat dir "/")) 959 (concat dir "/"))
956 filename)))) 960 filename))))
957 961