diff --git a/lisp/ls-lisp.el b/lisp/ls-lisp.el index 54da7fdc438..aa97960750c 100644 --- a/lisp/ls-lisp.el +++ b/lisp/ls-lisp.el @@ -62,10 +62,12 @@ 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 ((find-file-name-handler file))) + (let ((handler (find-file-name-handler file))) (if handler (funcall handler 'insert-directory file switches wildcard full-directory-p) + ;; Convert SWITCHES to a list of characters. + (setq switches (append switches nil)) (if wildcard (setq wildcard (file-name-nondirectory file) ; actually emacs regexp ;; perhaps convert it from shell to emacs syntax?