From: Stefan Monnier Date: Fri, 11 Apr 2008 13:34:14 +0000 (+0000) Subject: (dired-read-dir-and-switches): Use read-directory-name even for non-dialogs. X-Git-Tag: emacs-pretest-23.0.90~6331 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=da5a7abbc428c5db1dd5660f61e76719e99b4ce1;p=emacs.git (dired-read-dir-and-switches): Use read-directory-name even for non-dialogs. --- diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 445e84e9bd3..7f6b38f9ab1 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,5 +1,8 @@ 2008-04-11 Stefan Monnier + * dired.el (dired-read-dir-and-switches): Use read-directory-name even + for non-dialogs. + * Makefile.in (bootstrap-prepare): Don't copy ldefs-boot over loaddefs. * loadup.el: Load ldefs-boot.el if loaddefs.el doesn't exist. diff --git a/lisp/dired.el b/lisp/dired.el index 4ba6c958b11..faa048373e7 100644 --- a/lisp/dired.el +++ b/lisp/dired.el @@ -594,15 +594,12 @@ Don't use that together with FILTER." ;; If a dialog is about to be used, call read-directory-name so ;; the dialog code knows we want directories. Some dialogs can ;; only select directories or files when popped up, not both. - (if (next-read-file-uses-dialog-p) + (let ((default (and buffer-file-name + (abbreviate-file-name buffer-file-name)))) + (minibuffer-with-setup-hook + (lambda () (setq minibuffer-default default)) (read-directory-name (format "Dired %s(directory): " str) - nil default-directory nil) - (let ((default (and buffer-file-name - (abbreviate-file-name buffer-file-name)))) - (minibuffer-with-setup-hook - (lambda () (setq minibuffer-default default)) - (read-file-name (format "Dired %s(directory): " str) - nil default-directory nil))))))) + nil default-directory nil)))))) ;;;###autoload (define-key ctl-x-map "d" 'dired) ;;;###autoload