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:
parent
ce8d5c6fa5
commit
df1dbaf121
2 changed files with 7 additions and 1 deletions
3
etc/NEWS
3
etc/NEWS
|
@ -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
|
||||
|
|
|
@ -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 ()
|
||||
|
|
Loading…
Add table
Reference in a new issue