]> git.eshelyaron.com Git - emacs.git/commitdiff
* dired.el (dired-read-dir-and-switches): Call read-directory-name
authorJan Djärv <jan.h.d@swipnet.se>
Thu, 4 Nov 2004 15:22:00 +0000 (15:22 +0000)
committerJan Djärv <jan.h.d@swipnet.se>
Thu, 4 Nov 2004 15:22:00 +0000 (15:22 +0000)
if a dialog will be used, read-file-name otherwise.

lisp/ChangeLog
lisp/dired.el

index 38d78529b297442024f9efbbe2ad9582a5ec400f..9b05528a24f618f8d3db42dc1289d272ac609ece 100644 (file)
@@ -1,3 +1,8 @@
+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.
index c0fc33729c219f0cd5d934cb94f0444d154b577b..4553683b18179aed31b4da4893efb880fe2cdaa6 100644 (file)
@@ -546,8 +546,14 @@ Optional third argument FILTER, if non-nil, is a function to select
            (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