Mercurial > emacs
comparison lisp/files.el @ 7730:3846302b9c9c
(insert-directory): Use expanded file name to find handler.
author | Richard M. Stallman <rms@gnu.org> |
---|---|
date | Sat, 28 May 1994 12:33:08 +0000 |
parents | 814e18e2d3d4 |
children | fac7ff0a7aeb |
comparison
equal
deleted
inserted
replaced
7729:a1c07008521d | 7730:3846302b9c9c |
---|---|
2022 switches do not contain `d', so that a full listing is expected. | 2022 switches do not contain `d', so that a full listing is expected. |
2023 | 2023 |
2024 This works by running a directory listing program | 2024 This works by running a directory listing program |
2025 whose name is in the variable `insert-directory-program'. | 2025 whose name is in the variable `insert-directory-program'. |
2026 If WILDCARD, it also runs the shell specified by `shell-file-name'." | 2026 If WILDCARD, it also runs the shell specified by `shell-file-name'." |
2027 (let ((handler (find-file-name-handler file 'insert-directory))) | 2027 ;; We need the directory in order to find the right handler. |
2028 (let ((handler (find-file-name-handler (expand-file-name file) | |
2029 'insert-directory))) | |
2028 (if handler | 2030 (if handler |
2029 (funcall handler 'insert-directory file switches | 2031 (funcall handler 'insert-directory file switches |
2030 wildcard full-directory-p) | 2032 wildcard full-directory-p) |
2031 (if (eq system-type 'vax-vms) | 2033 (if (eq system-type 'vax-vms) |
2032 (vms-read-directory file switches (current-buffer)) | 2034 (vms-read-directory file switches (current-buffer)) |