Mercurial > emacs
changeset 57943:e4c39a455af0
* dired.el (dired-read-dir-and-switches): Call read-directory-name
if a dialog will be used, read-file-name otherwise.
author | Jan Djärv <jan.h.d@swipnet.se> |
---|---|
date | Thu, 04 Nov 2004 15:22:00 +0000 |
parents | 3a6cc929df05 |
children | d0ac3dd83e07 |
files | lisp/ChangeLog lisp/dired.el |
diffstat | 2 files changed, 13 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- 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 <jan.h.d@swipnet.se> + + * 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 <rms@gnu.org> * textmodes/table.el (table group): Add :version.
--- 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