+2004-11-04 Jan Dj\e,Ad\e(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.
(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