aboutsummaryrefslogtreecommitdiffstats
path: root/lisp/ls-lisp.el
diff options
context:
space:
mode:
Diffstat (limited to 'lisp/ls-lisp.el')
-rw-r--r--lisp/ls-lisp.el9
1 files changed, 1 insertions, 8 deletions
diff --git a/lisp/ls-lisp.el b/lisp/ls-lisp.el
index 54be933b2e..94b0ed4385 100644
--- a/lisp/ls-lisp.el
+++ b/lisp/ls-lisp.el
@@ -57,14 +57,7 @@ It does not support ordinary shell wildcards; instead, it allows
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)