On 2016-08-30 11:01, Stefan Monnier wrote: >> Also, why not just introduce a function buffer-min, instead of the >> (save-restriction) + (widen) dance? > > We could, yes. > > Note that it wouldn't help us in the present case, since we will look > (via compare-buffer-substring) at the whole buffer's text, so we need to > widen anyway. I see, thanks! I didn't realize that these functions needed widening. Its documentation doesn't seem to mention it, nor its docstring. What about the attached patch?