diff options
| author | Richard M. Stallman <rms@gnu.org> | 1993-08-15 05:47:03 +0000 |
|---|---|---|
| committer | Richard M. Stallman <rms@gnu.org> | 1993-08-15 05:47:03 +0000 |
| commit | 455d9d28a99fc63dd5f792ed08da3aa0df3a7c94 (patch) | |
| tree | d27839e42d0d231e57b9477e168241092337d3f0 /lisp/files.el | |
| parent | 690a797cf37ea7baa5307db1a16cf4c6a53edeea (diff) | |
| download | emacs-455d9d28a99fc63dd5f792ed08da3aa0df3a7c94.tar.gz | |
(find-file-noselect): If a find-file-not-found-hook succeeds, clear `error'.
Diffstat (limited to 'lisp/files.el')
| -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." ;; 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)) |
