# HG changeset patch # User Richard M. Stallman # Date 846795104 0 # Node ID 92289a4265edd9a17e72e969290f0e2ffd204fbf # Parent a6df390c0f5e95dffc83841fbcb5461dc5ea1924 (dired-find-file): Error if line's file does not exist. diff -r a6df390c0f5e -r 92289a4265ed lisp/dired.el --- 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."