aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEli Zaretskii <[email protected]>2001-07-03 13:02:55 +0000
committerEli Zaretskii <[email protected]>2001-07-03 13:02:55 +0000
commitf4a97216175cf74710b62ea8da0922705d4f14c1 (patch)
treed8acdfa774cd4eaeb01d3bf363b37a69d7f82a75
parent51a91c091083098a2f347564594ca169175bba0f (diff)
(ff-find-the-other-file): Use file-name-nondirectory
instead of string-match to find the basename of the file. From Pascal Obry <[email protected]>.
-rw-r--r--lisp/find-file.el3
1 files changed, 1 insertions, 2 deletions
diff --git a/lisp/find-file.el b/lisp/find-file.el
index d59f10d22b..5e5f376608 100644
--- a/lisp/find-file.el
+++ b/lisp/find-file.el
@@ -422,8 +422,7 @@ If optional IN-OTHER-WINDOW is non-nil, find the file in another window."
(buffer-file-name)
"/none.none"))
- (string-match ".*/\\(.+\\)$" pathname)
- (setq fname (substring pathname (match-beginning 1) (match-end 1))
+ (setq fname (file-name-nondirectory pathname)
no-match nil
match (car alist))