Mercurial > emacs
changeset 16490:92289a4265ed
(dired-find-file): Error if line's file does not exist.
author | Richard M. Stallman <rms@gnu.org> |
---|---|
date | Thu, 31 Oct 1996 20:51:44 +0000 |
parents | a6df390c0f5e |
children | 7094452bc337 |
files | lisp/dired.el |
diffstat | 1 files changed, 4 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/lisp/dired.el Thu Oct 31 19:53:19 1996 +0000 +++ b/lisp/dired.el Thu Oct 31 20:51:44 1996 +0000 @@ -1173,7 +1173,10 @@ (defun dired-find-file () "In dired, visit the file or directory named on this line." (interactive) - (find-file (file-name-sans-versions (dired-get-filename) t))) + (let ((file-name (file-name-sans-versions (dired-get-filename) t))) + (if (file-exists-p file-name) + (find-file file-name) + (error "File no longer exists; type `g' to update Dired buffer")))) (defun dired-mouse-find-file-other-window (event) "In dired, visit the file or directory name you click on."