I read the manual at http://www.gnu.org/software/emacs/manual/html_node/elisp/Saving-Buffers.html#Saving-Buffers, but still not quite understand what is the difference between the two. It seems to me they both work as a hook to run whatever function you set before saving the buffer to the visited file. could anyone explain with examples? Thanks.
I read the manual at http://www.gnu.org/software/emacs/manual/html_node/elisp/Saving-Buffers.html#Saving-Buffers , but still not quite understand what is
Share
write-*-functionsprovide a strict superset of whatbefore-save-hookcan do. More specifically,write-*-functionscan replace the normal saving mechanism with another one. This means that a function added towrite-*-functionsmight end up unused because some earlier function has already saved the buffer.