before-save-hook

before-save-hook is a variable defined in `files.el'.
Its value is
nil

  • This variable may be risky if used as a file-local variable.

Documentation:
Normal hook that is run before a buffer is saved to its file.

You can customize this variable.