Function: auto-insert-mode

Toggle Auto-insert mode, a global minor mode.
With a prefix argument ARG, enable Auto-insert mode if ARG is
positive, and disable it otherwise. If called from Lisp, enable
the mode if ARG is omitted or nil.

When Auto-insert mode is enabled, when new files are created you can
insert a template for the file depending on the mode of the buffer. (fn &optional ARG)

Variable: auto-insert-mode

Non-nil if Auto-Insert mode is enabled.
See the command `auto-insert-mode' for a description of this minor mode.
Setting this variable directly does not take effect;
either customize it (see the info node `Easy Customization')
or call the function `auto-insert-mode'.