Function: fileloop-initialize
fileloop-initialize is an autoloaded and byte-compiled function
defined in fileloop.el.gz.
Signature
(fileloop-initialize FILES SCAN-FUNCTION OPERATE-FUNCTION)
Documentation
Initialize a new round of operation on several files.
FILES can be either a list of file names, or an iterator (used with iter-next)
which returns a file name at each step.
SCAN-FUNCTION is a function called with no argument inside a buffer
and it should return non-nil if that buffer has something on which to operate.
OPERATE-FUNCTION is a function called with no argument; it is expected
to perform the operation on the current file buffer and when done
should return non-nil to mean that we should immediately continue
operating on the next file and nil otherwise.
Probably introduced at or before Emacs version 27.1.
Source Code
;; Defined in /usr/src/emacs/lisp/fileloop.el.gz
;;;###autoload
(defun fileloop-initialize (files scan-function operate-function)
"Initialize a new round of operation on several files.
FILES can be either a list of file names, or an iterator (used with `iter-next')
which returns a file name at each step.
SCAN-FUNCTION is a function called with no argument inside a buffer
and it should return non-nil if that buffer has something on which to operate.
OPERATE-FUNCTION is a function called with no argument; it is expected
to perform the operation on the current file buffer and when done
should return non-nil to mean that we should immediately continue
operating on the next file and nil otherwise."
(setq fileloop--iterator
(if (and (listp files) (not (functionp files)))
(fileloop--list-to-iterator files)
files))
(setq fileloop--scan-function scan-function)
(setq fileloop--operate-function operate-function)
(setq fileloop--freshly-initialized t))