Variable: write-file-hooks
write-file-hooks is an alias for write-file-functions, defined in
files.el.gz.
This variable is obsolete since 22.1; use write-file-functions
instead.
Value
nil
Documentation
List of functions to be called before saving a buffer to a file.
Used only by save-buffer.
If one of them returns non-nil, the file is considered already written
and the rest are not called.
These hooks are considered to pertain to the visited file.
So any buffer-local binding of this variable is discarded if you change
the visited file name with M-x set-visited-file-name (set-visited-file-name), but not when you
change the major mode.
This hook is not run if any of the functions in
write-contents-functions returns non-nil. Both hooks pertain
to how to save a buffer to file, for instance, choosing a suitable
coding system and setting mode bits. (See Info
node (elisp)Saving Buffers.) To perform various checks or
updates before the buffer is saved, use before-save-hook.
Probably introduced at or before Emacs version 18.
Aliases
write-file-hooks (obsolete since 22.1)