summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJan Djärv <jan.h.d@swipnet.se>2004-11-04 15:22:00 +0000
committerJan Djärv <jan.h.d@swipnet.se>2004-11-04 15:22:00 +0000
commit8d9e2a494025f771da16061f4ef3562a8e4578b0 (patch)
tree16a03e2e27b39cfbafb3508a6b2a2bc76a324e0b
parent88208bb85c778985d26a5990bf03980ba71e4b9d (diff)
downloademacs-8d9e2a494025f771da16061f4ef3562a8e4578b0.tar.gz
* dired.el (dired-read-dir-and-switches): Call read-directory-name
if a dialog will be used, read-file-name otherwise.
-rw-r--r--lisp/ChangeLog5
-rw-r--r--lisp/dired.el10
2 files changed, 13 insertions, 2 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index 38d78529b29..9b05528a24f 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -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.
diff --git a/lisp/dired.el b/lisp/dired.el
index c0fc33729c2..4553683b181 100644
--- a/lisp/dired.el
+++ b/lisp/dired.el
@@ -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