aboutsummaryrefslogtreecommitdiffstats
path: root/lisp
diff options
context:
space:
mode:
Diffstat (limited to 'lisp')
-rw-r--r--lisp/dired.el15
1 files changed, 12 insertions, 3 deletions
diff --git a/lisp/dired.el b/lisp/dired.el
index ef22d457bca..5741872cfc8 100644
--- a/lisp/dired.el
+++ b/lisp/dired.el
@@ -2736,9 +2736,18 @@ instead of `dired-actual-switches'."
2736 (save-excursion 2736 (save-excursion
2737 (goto-char (point-min)) 2737 (goto-char (point-min))
2738 (dired-goto-file-1 file file (point-max))) 2738 (dired-goto-file-1 file file (point-max)))
2739 ;; Otherwise, look for it as a relative name. The 2739 ;; Next, look for it as a relative name with leading
2740 ;; hair is to get the result of `dired-goto-subdir' 2740 ;; subdirectories. (This happens in Dired buffers
2741 ;; without calling it if we don't have any subdirs. 2741 ;; created by find-dired, for example.)
2742 (save-excursion
2743 (goto-char (point-min))
2744 (dired-goto-file-1 (file-relative-name file
2745 default-directory)
2746 file (point-max)))
2747 ;; Otherwise, look for it as a relative name, a base
2748 ;; name only. The hair is to get the result of
2749 ;; `dired-goto-subdir' without calling it if we don't
2750 ;; have any subdirs.
2742 (save-excursion 2751 (save-excursion
2743 (when (if (string= dir (expand-file-name default-directory)) 2752 (when (if (string= dir (expand-file-name default-directory))
2744 (goto-char (point-min)) 2753 (goto-char (point-min))