X-Git-Url: https://code.delx.au/gnu-emacs/blobdiff_plain/62fca47221fc9d248511cd94fbcb41ddb46763e6..118a31a3b1eb08cba14887c3134054e9b4383688:/lisp/dired-aux.el diff --git a/lisp/dired-aux.el b/lisp/dired-aux.el index bb93cce650..b4e2dc0a93 100644 --- a/lisp/dired-aux.el +++ b/lisp/dired-aux.el @@ -1,7 +1,7 @@ ;;; dired-aux.el --- less commonly used parts of dired -;; Copyright (C) 1985-1986, 1992, 1994, 1998, 2000-2014 -;; Free Software Foundation, Inc. +;; Copyright (C) 1985-1986, 1992, 1994, 1998, 2000-2015 Free Software +;; Foundation, Inc. ;; Author: Sebastian Kremer . ;; Maintainer: emacs-devel@gnu.org @@ -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.