comparison lisp/ffap.el @ 54106:9aa83ff74ef0

(ffap-file-at-point): Try parent directories.
author Eli Zaretskii <eliz@is.elta.co.il>
date Sat, 21 Feb 2004 13:41:04 +0000
parents 89450ca4c47e
children b91c8ab75b81
comparison
equal deleted inserted replaced
54105:10f8365e0cf4 54106:9aa83ff74ef0
1183 (ffap-file-exists-string 1183 (ffap-file-exists-string
1184 (ffap-replace-file-component 1184 (ffap-replace-file-component
1185 remote-dir (substring name (match-end 1))))) 1185 remote-dir (substring name (match-end 1)))))
1186 (ffap-file-exists-string 1186 (ffap-file-exists-string
1187 (ffap-replace-file-component remote-dir name)))))) 1187 (ffap-replace-file-component remote-dir name))))))
1188 ;; Try all parent directories by deleting the trailing directory
1189 ;; name until existing directory is found or name stops changing
1190 ((let ((dir name))
1191 (while (and dir
1192 (not (ffap-file-exists-string dir))
1193 (not (equal dir (setq dir (file-name-directory
1194 (directory-file-name dir)))))))
1195 (ffap-file-exists-string dir)))
1188 ) 1196 )
1189 (set-match-data data)))) 1197 (set-match-data data))))
1190 1198
1191 ;;; Prompting (`ffap-read-file-or-url'): 1199 ;;; Prompting (`ffap-read-file-or-url'):
1192 ;; 1200 ;;