changeset 4284:831da9ea9a95

(dired-readin-insert): If we got a list of files, pass nil for WILDCARD arg to dired-insert-directory. (dired-readin-insert): Don't use the "whole directory" case if DIR-OR-LIST is a list.
author Richard M. Stallman <rms@gnu.org>
date Mon, 26 Jul 1993 05:56:43 +0000
parents f705c18c410d
children 37dded875497
files lisp/dired.el
diffstat 1 files changed, 10 insertions(+), 6 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/dired.el	Mon Jul 26 05:55:40 1993 +0000
+++ b/lisp/dired.el	Mon Jul 26 05:56:43 1993 +0000
@@ -489,13 +489,17 @@
     (if (consp dir-or-list)
 	(setq dirname (car dir-or-list))
       (setq dirname dir-or-list))
-    (if (equal default-directory dirname)	;; i.e., (file-directory-p dirname)
+    (if (and (equal default-directory dirname)
+	     (not (consp dir-or-list)))
+	;; If we are reading a whole single directory...
 	(dired-insert-directory dir-or-list dired-actual-switches nil t)
       (if (not (file-readable-p
 		(directory-file-name (file-name-directory dirname))))
 	  (error "Directory %s inaccessible or nonexistent" dirname)
-	;; else assume it contains wildcards:
-	(dired-insert-directory dir-or-list dired-actual-switches t)
+	;; Else assume it contains wildcards,
+	;; unless it is an explicit list of files.
+	(dired-insert-directory dir-or-list dired-actual-switches
+				(not (listp dir-or-list)))
 	(save-excursion		;; insert wildcard instead of total line:
 	  (goto-char (point-min))
 	  (insert "wildcard " (file-name-nondirectory dirname) "\n"))))))
@@ -506,9 +510,9 @@
   ;; list.
   (if (consp dir-or-list)
       (progn
-      (mapcar
-       (function (lambda (x) (insert-directory x switches wildcard full-p)))
-       (cdr dir-or-list)))
+	(mapcar
+	 (function (lambda (x) (insert-directory x switches wildcard full-p)))
+	 (cdr dir-or-list)))
     (insert-directory dir-or-list switches wildcard full-p))
   (setq dired-directory dir-or-list))