Here is a simple example if a style file.
;;; book.el - Special code for book style. (TeX-add-style-hook "book" (function (lambda () (setq LaTeX-largest-level (LaTeX-section-level ("chapter"))))))
This file specifies that the largest kind of section in a LaTeX document
using the book document style is chapter. The interesting thing to
notice is that the style file define an (anonymous) function, and add it
to the list of loaded style hooks by calling
The first time the user indirectly tries to access some style specific information, such as the largest sectioning command available, the style hooks for all files directly or indirectly read by the current document is executed. The actual files will only be evaluated once, but the hooks will be called for each buffer using the style file.
Function: TeX-add-style-hook style hook
Add hook to the list of functions to run when we use the TeX file style.