Subject: bug#5773: 23.1; vc-diff save buffer when re-diffing (or save whole fileset)

From: Lars Ingebrigtsen <[email-masked]>
Date: Mon, 14 Sep 2020 15:42:46 +0200

Kevin Ryde <[email-masked]> writes:

> If you re-run M-x vc-diff from a *vc-diff* buffer, it doesn't ask you to
> save the buffer being diffed the way that it does when operating from
> that buffer itself
>
>     C-x C-f /some/file/under/vc/control
>     C-x v =
>     C-x o
>     # edit the file's buffer a bit
>     C-x o           # back to the *vc-diff*
>     C-x v =
>
>     => doesn't ask about saving the edits

This bug is still present in Emacs 28, and the ten year old patch
amazingly still applies, and fixes the issue, so I've applied it to the
trunk (with minor stylistic changes).

There was then some discussion about whether other functions could also
do with a similar change, which is true, but that shouldn't preclude us
from fixing this bug.  If somebody sees similar issues in other buffers
that they think should be changed, then they can open new bug reports.

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no