Subject: bug#31888: 27.0.50; Segmentation fault in replace-buffer-contents

From: Eli Zaretskii <[email-masked]>
Date: Fri, 29 Jun 2018 20:34:38 +0300

> From: Stefan Monnier <[email-masked]>
> Cc: [email-masked], [email-masked], [email-masked], [email-masked]
> Date: Fri, 29 Jun 2018 12:57:20 -0400
> 
> Keep track of the first and last char actually modified (or,
> equivalently, keep track of the number of chars unmodified at the
> beginning and at the end, as this is often easier).

Is that worth the hassle?  The caller asked to replace the entire
buffer by something else, why should they expect after-change hooks to
be run on something other than the entire buffer?