]> git.eshelyaron.com Git - emacs.git/commitdiff
(dired-read-dir-and-switches): Use read-directory-name even for non-dialogs.
authorStefan Monnier <monnier@iro.umontreal.ca>
Fri, 11 Apr 2008 13:34:14 +0000 (13:34 +0000)
committerStefan Monnier <monnier@iro.umontreal.ca>
Fri, 11 Apr 2008 13:34:14 +0000 (13:34 +0000)
lisp/ChangeLog
lisp/dired.el

index 445e84e9bd394c215380358f8a9cc42a0bbeab68..7f6b38f9ab1eb6c96f18fc11af8c532a0af27541 100644 (file)
@@ -1,5 +1,8 @@
 2008-04-11  Stefan Monnier  <monnier@iro.umontreal.ca>
 
+       * dired.el (dired-read-dir-and-switches): Use read-directory-name even
+       for non-dialogs.
+
        * Makefile.in (bootstrap-prepare): Don't copy ldefs-boot over loaddefs.
        * loadup.el: Load ldefs-boot.el if loaddefs.el doesn't exist.
 
index 4ba6c958b119e0e3ec6417d987fda2138a345aab..faa048373e77fddb55a722f688f8a666ec271e88 100644 (file)
@@ -594,15 +594,12 @@ Don't use that together with FILTER."
            ;; 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)
+           (let ((default (and buffer-file-name
+                               (abbreviate-file-name buffer-file-name))))
+             (minibuffer-with-setup-hook
+                 (lambda () (setq minibuffer-default default))
                (read-directory-name (format "Dired %s(directory): " str)
-                                    nil default-directory nil)
-             (let ((default (and buffer-file-name
-                                 (abbreviate-file-name buffer-file-name))))
-               (minibuffer-with-setup-hook
-                   (lambda () (setq minibuffer-default default))
-                 (read-file-name (format "Dired %s(directory): " str)
-                                 nil default-directory nil)))))))
+                                    nil default-directory nil))))))
 
 ;;;###autoload (define-key ctl-x-map "d" 'dired)
 ;;;###autoload