Make fileloop skip missing files

* lisp/fileloop.el (fileloop-next-file): If a file doesn't exist,
skip to the next one (bug#44979).
This commit is contained in:
Dmitry Gutov 2021-07-30 14:58:25 +02:00 committed by Lars Ingebrigtsen
parent ce8d5c6fa5
commit df1dbaf121
2 changed files with 7 additions and 1 deletions

View file

@ -2340,6 +2340,9 @@ This command, called interactively, toggles the local value of
** Miscellaneous
---
*** fileloop will now skip missing files instead of signalling an error.
+++
*** ".dir-locals.el" now supports setting 'auto-mode-alist'.
The new 'auto-mode-alist' specification in ".dir-locals.el" files can

View file

@ -120,7 +120,10 @@ operating on the next file and nil otherwise."
(kill-all-local-variables)
(erase-buffer)
(setq new next)
(insert-file-contents new nil))
(condition-case nil
(insert-file-contents new nil)
(file-missing
(fileloop-next-file novisit))))
new)))
(defun fileloop-continue ()