(dired-find-file): Bind find-file-run-dired around the call to find-file.

From Dan Nicolaescu <dann@ics.uci.edu>.
This commit is contained in:
Pavel Janík 2002-06-24 11:27:29 +00:00
parent 778c5360c9
commit b6fbd705bb
2 changed files with 9 additions and 1 deletions

View file

@ -1,3 +1,8 @@
2002-06-24 Pavel Jan,Bm(Bk <Pavel@Janik.cz>
* dired.el (dired-find-file): Bind find-file-run-dired around the
call to find-file. From Dan Nicolaescu <dann@ics.uci.edu>.
2002-06-18 Juanma Barranquero <lektu@terra.es>
* eshell/em-pred.el (eshell-modifier-help-string): Fix typos.

View file

@ -1360,7 +1360,10 @@ Creates a buffer if necessary."
(defun dired-find-file ()
"In dired, visit the file or directory named on this line."
(interactive)
(let ((file-name (file-name-sans-versions (dired-get-filename) t)))
(let ((file-name (file-name-sans-versions (dired-get-filename) t))
;; bind it so that the command works on directories too,
;; independent of of the user's setting
(find-file-run-dired t))
(if (file-exists-p file-name)
(find-file file-name)
(if (file-symlink-p file-name)