Eric Michael Timmons writes: > Fix by telling `perform-replace' to operate over the entire > buffer. Could potentially be further be optimized by saving the point > in the scan-function and using it as the start point in the > operate-function. Since the current code is trying to save the point in the scan function, it's better to keep that optimization. See patch below. Should this go to emacs-27 or master? The assumption that point would be preserved seems to be long-standing, but I guess the change in the default of switch-to-buffer-preserve-window-point is what surfaces the bug and makes it more recent...