* lisp/fileloop.el (fileloop--case-fold):
Extract from existing code. Honor search-upper-case (bug#40940).
(fileloop-initialize-replace, fileloop-initialize-search): Use it.
Update the docstring.
Suggested by Eric Michael Timmons <etimmons@mit.edu>.
* lisp/fileloop.el (fileloop-initialize-replace): Save the
match-beginning position in a variable instead of the buffer's point.
The point may be changed by the time perform-replace is called, e.g.,
due to switch-to-buffer-preserve-window-point.