comparison 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
comparison
equal deleted inserted replaced
1671:b2a50ea75eea 1672:ecf43116a845
55 This version of the function comes from `directory.el'. 55 This version of the function comes from `directory.el'.
56 It does not support ordinary shell wildcards; instead, it allows 56 It does not support ordinary shell wildcards; instead, it allows
57 regular expressions to match file names. 57 regular expressions to match file names.
58 58
59 The switches that work are: A a c i r S s t u" 59 The switches that work are: A a c i r S s t u"
60 (let (handler (handlers file-name-handler-alist)) 60 (let (handler ((find-file-name-handler file)))
61 (save-match-data
62 (while (and (consp handlers) (null handler))
63 (if (and (consp (car handlers))
64 (stringp (car (car handlers)))
65 (string-match (car (car handlers)) file))
66 (setq handler (cdr (car handlers))))
67 (setq handlers (cdr handlers))))
68 (if handler 61 (if handler
69 (funcall handler 'insert-directory file switches 62 (funcall handler 'insert-directory file switches
70 wildcard full-directory-p) 63 wildcard full-directory-p)
71 (if wildcard 64 (if wildcard
72 (setq wildcard (file-name-nondirectory file) ; actually emacs regexp 65 (setq wildcard (file-name-nondirectory file) ; actually emacs regexp