Mercurial > emacs
changeset 14401:83e1b1f5ce8f
(list-directory): Set default-directory better if the
argument is a directory's file name.
author | Richard M. Stallman <rms@gnu.org> |
---|---|
date | Sun, 28 Jan 1996 19:27:44 +0000 |
parents | 20c5a9797aa8 |
children | 64e80af54f06 |
files | lisp/files.el |
diffstat | 1 files changed, 4 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/lisp/files.el Sun Jan 28 07:10:18 1996 +0000 +++ b/lisp/files.el Sun Jan 28 19:27:44 1996 +0000 @@ -2536,7 +2536,10 @@ (terpri) (save-excursion (set-buffer "*Directory*") - (setq default-directory (file-name-directory dirname)) + (setq default-directory + (if (file-directory-p dirname) + (file-name-as-directory dirname) + (file-name-directory dirname))) (let ((wildcard (not (file-directory-p dirname)))) (insert-directory dirname switches wildcard (not wildcard)))))))