1
0
mirror of https://git.savannah.gnu.org/git/emacs.git synced 2024-11-26 07:33:47 +00:00

(dired-internal-noselect): When setting default-directory,

don't check file-name-directory.
This commit is contained in:
Richard M. Stallman 1997-04-13 20:19:19 +00:00
parent cb35a83c0e
commit e3cd4b53c5

View File

@ -481,9 +481,11 @@ If DIRNAME is already in a dired buffer, that buffer is used without refresh."
"Directory has changed on disk; type \\[revert-buffer] to update Dired")))))
;; Else a new buffer
(setq default-directory
(if (file-directory-p dirname)
dirname
(file-name-directory dirname)))
;; We can do this unconditionally
;; because dired-noselect ensures that the name
;; is passed in directory name syntax
;; if it was the name of a directory at all.
(file-name-directory dirname))
(or switches (setq switches dired-listing-switches))
(dired-mode dirname switches)
(if mode (funcall mode))