Commit 455d9d28 authored by Richard M. Stallman's avatar Richard M. Stallman
Browse files

(find-file-noselect): If a find-file-not-found-hook succeeds, clear `error'.

parent 690a797c
......@@ -652,7 +652,11 @@ The buffer is not selected, just returned to the caller."
;; Run find-file-not-found-hooks until one returns non-nil.
(let ((hooks find-file-not-found-hooks))
(while (and hooks
(not (funcall (car hooks))))
(not (and (funcall (car hooks))
;; If a hook succeeded, clear error.
(progn (setq error nil)
;; Also exit the loop.
(setq hooks (cdr hooks))))))
;; Find the file's truename, and maybe use that as visited name.
(setq buffer-file-truename (abbreviate-file-name truename))
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment