Next: write-contents-functions—a hook, Previous: not-modified, Up: Saving Files [Index]
This variable a list of functions to be called before writing out a buffer to
its visited file. If one of them returns non-‘nil’, the file is considered
already written and the rest of the functions are not called, nor is the usual
code for writing the file executed. In addition, if a function in
write-file-functions
returns non-‘nil’, it is responsible for making a backup
file, using the following code:
(or buffer-backed-up (backup-buffer))
Even though this is not a normal hook, you can use ‘add-hook’ and ‘remove-hook’ to manipulate the list.