comparison lisp/package-get.el @ 390:c6012109f545 r21-2-10

Import from CVS: tag r21-2-10
author cvs
date Mon, 13 Aug 2007 11:10:03 +0200
parents aabb7f5b1c81
children 6719134a07c2
comparison
equal deleted inserted replaced
389:94c6b1f087e1 390:c6012109f545
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