aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEli Zaretskii2004-02-21 13:42:04 +0000
committerEli Zaretskii2004-02-21 13:42:04 +0000
commit7e1626fbe828a35ad55f977b607200ed0e5ceeba (patch)
tree329fb692b0621fd8e0c78a68dee6caa1df114ea4
parent69e82404c092d8dbe35e618da04b5bc423f5ef61 (diff)
downloademacs-7e1626fbe828a35ad55f977b607200ed0e5ceeba.tar.gz
emacs-7e1626fbe828a35ad55f977b607200ed0e5ceeba.zip
(ffap-file-at-point): Try parent directories.
-rw-r--r--lisp/ChangeLog4
-rw-r--r--lisp/ffap.el8
2 files changed, 12 insertions, 0 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index 2894f660197..72219c47da5 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,3 +1,7 @@
12004-02-21 Juri Linkov <juri@jurta.org>
2
3 * ffap.el (ffap-file-at-point): Try parent directories.
4
12004-02-21 Klaus Zeitler <kzeitler@lucent.com> 52004-02-21 Klaus Zeitler <kzeitler@lucent.com>
2 6
3 * vcursor.el (vcursor-modifiers): New defcustom. 7 * vcursor.el (vcursor-modifiers): New defcustom.
diff --git a/lisp/ffap.el b/lisp/ffap.el
index 668700a5c1f..27abd52f563 100644
--- a/lisp/ffap.el
+++ b/lisp/ffap.el
@@ -1185,6 +1185,14 @@ which may actually result in an url rather than a filename."
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