AUCTeX doesn't really know the class used in a document, all the packages and class loaded are listed in the variable TeX-active-styles
. The only problem with it is that it mixes packages and classes, but this isn't usually a big deal since packages tend not to have the same name of a class.
You can search for the wanted package/class with member
:
(if (member "beamer" TeX-active-styles)
;; true...
;; false...
)
In addition, starting from AUCTeX 11.88 there is also the possibility to check for the options passed to a specific package or class (and here packages and classes are separated) with functions LaTeX-provided-class-options-member
and LaTeX-provided-package-options-member
, but if there are no options passed to a package/class these functions are useless.
Before version 11.88, all the options were listed in TeX-active-styles
too, making it impossible to distinguish between options and packages/classes.
Actually, the different behavior you describe for \item
is obtained by adding the ("itemize" . LaTeX-item-beamer)
entry to LaTeX-item-list
in style/beamer.el
, so TeX-active-styles
is not used at all.