diff options
| -rw-r--r-- | lisp/files.el | 6 |
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)) |