I have a file that contains important information and I often have to make small changes in this file. Every once in a while I accidentally change something in this file and then save it without noticing that something is missing. What I'd like to have is that Emacs automatically shows me a diff between the buffer content and the content of the file on disk and asks me if I really want to save it. Is there an existing solution for this?
highlight-changes-mode but that's not what I want. I shows changes compared to when the mode was enabled not compared to the file on disk. In large files, it is also difficult to spot the changes even when they are marked red with