mirror of
git://git.sv.gnu.org/emacs.git
synced 2025-12-15 10:30:25 -08:00
(dired-find-file): Error if line's file does not exist.
This commit is contained in:
parent
9663837a53
commit
c439687b4d
1 changed files with 4 additions and 1 deletions
|
|
@ -1173,7 +1173,10 @@ Creates a buffer if necessary."
|
|||
(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."
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue