From: Eli Zaretskii Date: Sat, 23 Jun 2007 09:52:06 +0000 (+0000) Subject: (insert-directory): Don't treat FILE as a wildcard if FILE exists as X-Git-Tag: emacs-pretest-22.1.90~1326 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=9b40e204ec4deafee200519db1dcbb0074a1083c;p=emacs.git (insert-directory): Don't treat FILE as a wildcard if FILE exists as a directory. --- diff --git a/lisp/ChangeLog b/lisp/ChangeLog index b8277ef6be7..e2441910578 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,8 @@ +2007-06-23 Eli Zaretskii + + * ls-lisp.el (insert-directory): Don't treat FILE as a wildcard if + FILE exists as a directory. + 2007-06-21 Reto Zimmermann * vera-mode.el (vera-mode): Fix `commend-end-skip' setting. diff --git a/lisp/ls-lisp.el b/lisp/ls-lisp.el index 94c8004ff5e..5d6d68e3271 100644 --- a/lisp/ls-lisp.el +++ b/lisp/ls-lisp.el @@ -229,7 +229,10 @@ that work are: A a c i r S s t u U X g G B C R and F partly." ;; `ls' don't mind, we certainly do, because it makes us think ;; there is no wildcard, only a directory name. (if (and ls-lisp-support-shell-wildcards - (string-match "[[?*]" file)) + (string-match "[[?*]" file) + ;; Prefer an existing directory to wildcards, like + ;; dired-noselect does. + (not (file-directory-p file))) (progn (or (not (eq (aref file (1- (length file))) ?/)) (setq file (substring file 0 (1- (length file)))))