From: Filipp Gunbin Date: Thu, 25 Dec 2014 18:17:43 +0000 (+0300) Subject: make dired-maybe-insert-subdir always skip trivial files X-Git-Tag: emacs-25.0.90~2634^2~1 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=f4a6345114b02fb725192aa548f2e84096fbaae6;p=emacs.git make dired-maybe-insert-subdir always skip trivial files --- diff --git a/lisp/dired-aux.el b/lisp/dired-aux.el index bb93cce6500..acc7e767d69 100644 --- a/lisp/dired-aux.el +++ b/lisp/dired-aux.el @@ -2062,7 +2062,10 @@ See Info node `(emacs)Subdir switches' for more details." ;; inserted *after* opoint. (setq dirname (file-name-as-directory dirname)) (or (and (not switches) - (dired-goto-subdir dirname)) + (when (dired-goto-subdir dirname) + (unless (dired-subdir-hidden-p dirname) + (dired-initial-position dirname)) + t)) (dired-insert-subdir dirname switches no-error-if-not-dir-p)) ;; Push mark so that it's easy to find back. Do this after the ;; insert message so that the user sees the `Mark set' message.