From: Eli Zaretskii Date: Tue, 3 Jul 2001 13:02:55 +0000 (+0000) Subject: (ff-find-the-other-file): Use file-name-nondirectory X-Git-Tag: emacs-pretest-21.0.104~85 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=f4a97216175cf74710b62ea8da0922705d4f14c1;p=emacs.git (ff-find-the-other-file): Use file-name-nondirectory instead of string-match to find the basename of the file. From Pascal Obry . --- diff --git a/lisp/find-file.el b/lisp/find-file.el index d59f10d22bd..5e5f3766084 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))