Function: find-file-existing
find-file-existing is an interactive and byte-compiled function
defined in files.el.gz.
Signature
(find-file-existing FILENAME)
Documentation
Edit the existing file FILENAME.
Like C-x C-f (find-file), but allow only a file that exists, and do not allow
file names with wildcards.
Key Bindings
Source Code
;; Defined in /usr/src/emacs/lisp/files.el.gz
(defun find-file-existing (filename)
"Edit the existing file FILENAME.
Like \\[find-file], but allow only a file that exists, and do not allow
file names with wildcards."
(interactive (nbutlast (find-file-read-args "Find existing file: " t)))
(if (and (not (called-interactively-p 'interactive))
(not (file-exists-p filename)))
(error "%s does not exist" filename)
(find-file filename)
(current-buffer)))