When closing a dirty buffer, or doing a "reload" of a dirty buffer, Instead of popping up a dialog asking confirming that changes are not saved, do a comparison of the Md5sum of the buffer and what is on the disk, and if they match, don't show any dialog.