From: Richard M. Stallman Date: Wed, 16 Jul 1997 20:55:50 +0000 (+0000) Subject: (dired-find-file): Better error message X-Git-Tag: emacs-20.1~1122 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=55642aa486ffc855ee84c6c9bdad75942fdec2d6;p=emacs.git (dired-find-file): Better error message for symlink to nonexistent target. --- diff --git a/lisp/dired.el b/lisp/dired.el index c4cfc2ea73e..c767b1c6b3e 100644 --- a/lisp/dired.el +++ b/lisp/dired.el @@ -1226,7 +1226,9 @@ Creates a buffer if necessary." (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")))) + (if (file-symlink-p file-name) + (error "File is a symlink to a nonexistent target") + (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."