aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRichard M. Stallman1993-08-15 05:47:03 +0000
committerRichard M. Stallman1993-08-15 05:47:03 +0000
commit455d9d28a99fc63dd5f792ed08da3aa0df3a7c94 (patch)
treed27839e42d0d231e57b9477e168241092337d3f0
parent690a797cf37ea7baa5307db1a16cf4c6a53edeea (diff)
downloademacs-455d9d28a99fc63dd5f792ed08da3aa0df3a7c94.tar.gz
emacs-455d9d28a99fc63dd5f792ed08da3aa0df3a7c94.zip
(find-file-noselect): If a find-file-not-found-hook succeeds, clear `error'.
-rw-r--r--lisp/files.el6
1 files changed, 5 insertions, 1 deletions
diff --git a/lisp/files.el b/lisp/files.el
index b21e2736eb5..56d92806180 100644
--- a/lisp/files.el
+++ b/lisp/files.el
@@ -652,7 +652,11 @@ The buffer is not selected, just returned to the caller."
652 ;; Run find-file-not-found-hooks until one returns non-nil. 652 ;; Run find-file-not-found-hooks until one returns non-nil.
653 (let ((hooks find-file-not-found-hooks)) 653 (let ((hooks find-file-not-found-hooks))
654 (while (and hooks 654 (while (and hooks
655 (not (funcall (car hooks)))) 655 (not (and (funcall (car hooks))
656 ;; If a hook succeeded, clear error.
657 (progn (setq error nil)
658 ;; Also exit the loop.
659 t))))
656 (setq hooks (cdr hooks)))))) 660 (setq hooks (cdr hooks))))))
657 ;; Find the file's truename, and maybe use that as visited name. 661 ;; Find the file's truename, and maybe use that as visited name.
658 (setq buffer-file-truename (abbreviate-file-name truename)) 662 (setq buffer-file-truename (abbreviate-file-name truename))