# HG changeset patch # User Jan Dj¸«£rv # Date 1099581720 0 # Node ID e4c39a455af02fc3b5e50daa971bfc3160407715 # Parent 3a6cc929df057a5dc43d8d811b26c1c9ae5d4902 * dired.el (dired-read-dir-and-switches): Call read-directory-name if a dialog will be used, read-file-name otherwise. diff -r 3a6cc929df05 -r e4c39a455af0 lisp/ChangeLog --- a/lisp/ChangeLog Thu Nov 04 15:19:49 2004 +0000 +++ b/lisp/ChangeLog Thu Nov 04 15:22:00 2004 +0000 @@ -1,3 +1,8 @@ +2004-11-04 Jan Dj,Ad(Brv + + * dired.el (dired-read-dir-and-switches): Call read-directory-name + if a dialog will be used, read-file-name otherwise. + 2004-11-04 Richard M. Stallman * textmodes/table.el (table group): Add :version. diff -r 3a6cc929df05 -r e4c39a455af0 lisp/dired.el --- a/lisp/dired.el Thu Nov 04 15:19:49 2004 +0000 +++ b/lisp/dired.el Thu Nov 04 15:22:00 2004 +0000 @@ -546,8 +546,14 @@ (if current-prefix-arg (read-string "Dired listing switches: " dired-listing-switches)) - (read-directory-name (format "Dired %s(directory): " str) - nil default-directory nil)))) + ;; 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) + (read-directory-name (format "Dired %s(directory): " str) + nil default-directory nil) + (read-file-name (format "Dired %s(directory): " str) + nil default-directory nil))))) ;;;###autoload (define-key ctl-x-map "d" 'dired) ;;;###autoload