Next: , Previous: , Up: Saving Files   [Index]


7.3.3.7 write-contents-functions—a hook

Variable: write-contents-functions

This works just like ‘write-file-functions’, but it is intended for hooks that pertain to the buffer’s contents, not to the particular visited file or its location, and can be used to create arbitrary save processes for buffers that aren’t visiting files at all. Such hooks are usually set up by major modes, as buffer-local bindings for this variable.

If any of the functions in this hook returns non-‘nil’, the file is considered already written and the rest are not called and neither are the functions in write-file-functions.