changeset 4645:f00c973bc8a4

(find-file-noselect): If a find-file-not-found-hook succeeds, clear `error'.
author Richard M. Stallman <rms@gnu.org>
date Sun, 15 Aug 1993 05:47:03 +0000
parents e19a64761187
children bdc64f022625
files lisp/files.el
diffstat 1 files changed, 5 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/files.el	Sun Aug 15 04:38:25 1993 +0000
+++ b/lisp/files.el	Sun Aug 15 05:47:03 1993 +0000
@@ -652,7 +652,11 @@
 	     ;; 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.
+					    t))))
 		 (setq hooks (cdr hooks))))))
 	  ;; Find the file's truename, and maybe use that as visited name.
 	  (setq buffer-file-truename (abbreviate-file-name truename))