Commit d2473540 authored by Andreas Schwab's avatar Andreas Schwab
Browse files

(insert-directory): Don't lose original file name,

undoing an undocumented change.
parent c0bbaf57
2000-08-17 Andreas Schwab <schwab@suse.de>
* files.el (insert-directory): Don't lose original file name,
undoing an undocumented change.
2000-08-17 Alex Schroeder <alex@gnu.org>
* sql.el (sql-magic-go): Use comint-bol.
......
......@@ -3503,8 +3503,8 @@ This works by running a directory listing program
whose name is in the variable `insert-directory-program'.
If WILDCARD, it also runs the shell specified by `shell-file-name'."
;; We need the directory in order to find the right handler.
(let* ((file (expand-file-name file))
(handler (find-file-name-handler file 'insert-directory)))
(let ((handler (find-file-name-handler (expand-file-name file)
'insert-directory)))
(if handler
(funcall handler 'insert-directory file switches
wildcard full-directory-p)
......@@ -3519,7 +3519,10 @@ If WILDCARD, it also runs the shell specified by `shell-file-name'."
(result
(if wildcard
;; Run ls in the directory of the file pattern we asked for
(let ((default-directory (file-name-directory file))
(let ((default-directory
(if (file-name-absolute-p file)
(file-name-directory file)
(file-name-directory (expand-file-name file))))
(pattern (file-name-nondirectory file)))
(call-process
shell-file-name nil t nil
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment