]> git.eshelyaron.com Git - emacs.git/commitdiff
(ff-find-the-other-file): Use file-name-nondirectory
authorEli Zaretskii <eliz@gnu.org>
Tue, 3 Jul 2001 13:02:55 +0000 (13:02 +0000)
committerEli Zaretskii <eliz@gnu.org>
Tue, 3 Jul 2001 13:02:55 +0000 (13:02 +0000)
instead of string-match to find the basename of the file.  From
Pascal Obry <p.obry@wanadoo.fr>.

lisp/find-file.el

index d59f10d22bd68638111ae94cb5acf68a850e58d4..5e5f37660844aa59cd161f52ad393ed5cae7fc81 100644 (file)
@@ -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))