diff lisp/ls-lisp.el @ 1672:ecf43116a845

The find-file-name-handler function in ../src/fileio.c is now callable from lisp; use it instead of writing out its code. * dired-aux.el (dired-compress-file): Just that. * dired.el (dired-uncache): Just that. * files.el (file-local-copy, file-truename, file-name-sans-versions, make-directory, save-buffers-kill-emacs): Just that. * ls-lisp.el (insert-directory): Just that.
author Jim Blandy <jimb@redhat.com>
date Sat, 12 Dec 1992 15:21:45 +0000
parents 92791ed2d1eb
children fb0ed5a1d0f3
line wrap: on
line diff
--- a/lisp/ls-lisp.el	Sat Dec 12 15:21:21 1992 +0000
+++ b/lisp/ls-lisp.el	Sat Dec 12 15:21:45 1992 +0000
@@ -57,14 +57,7 @@
 regular expressions to match file names.
 
 The switches that work are: A a c i r S s t u"
-  (let (handler (handlers file-name-handler-alist))
-    (save-match-data
-     (while (and (consp handlers) (null handler))
-       (if (and (consp (car handlers))
-		(stringp (car (car handlers)))
-		(string-match (car (car handlers)) file))
-	   (setq handler (cdr (car handlers))))
-       (setq handlers (cdr handlers))))
+  (let (handler ((find-file-name-handler file)))
     (if handler
 	(funcall handler 'insert-directory file switches
 		 wildcard full-directory-p)