mirror of
git://git.sv.gnu.org/emacs.git
synced 2026-02-20 20:07:36 +00:00
(find-file-noselect): If a find-file-not-found-hook succeeds, clear `error'.
This commit is contained in:
parent
690a797cf3
commit
455d9d28a9
1 changed files with 5 additions and 1 deletions
|
|
@ -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))
|
||||
|
|
|
|||
Loading…
Reference in a new issue