diff options
author | Dmitry Gutov <dgutov@yandex.ru> | 2021-07-30 14:58:25 +0200 |
---|---|---|
committer | Lars Ingebrigtsen <larsi@gnus.org> | 2021-07-30 14:58:25 +0200 |
commit | df1dbaf121703aebae83d2725b7aed8b961f2913 (patch) | |
tree | 98b97ecefdd863a95aeb55affbf958463a68b436 /lisp/fileloop.el | |
parent | ce8d5c6fa5c9966f2507d5299ac9dc5e2db33aa3 (diff) | |
download | emacs-df1dbaf121703aebae83d2725b7aed8b961f2913.tar.gz emacs-df1dbaf121703aebae83d2725b7aed8b961f2913.tar.bz2 emacs-df1dbaf121703aebae83d2725b7aed8b961f2913.zip |
Make fileloop skip missing files
* lisp/fileloop.el (fileloop-next-file): If a file doesn't exist,
skip to the next one (bug#44979).
Diffstat (limited to 'lisp/fileloop.el')
-rw-r--r-- | lisp/fileloop.el | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/lisp/fileloop.el b/lisp/fileloop.el index 8a2755d69a5..45b9cea9397 100644 --- a/lisp/fileloop.el +++ b/lisp/fileloop.el @@ -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 () |