Possible Duplicate:
emacs lisp, how to get buffer major mode?
Is there a way for Emacs Lisp code to determine the current major mode?
Possible Duplicate:
emacs lisp, how to get buffer major mode?
Is there a way for Emacs Lisp code to determine the current major mode?
You can look at the value of the variable major-mode
.