Page content moved. See:

Emacs: What's Major Mode?

Emacs: What's Minor Mode?

Emacs Lisp: How to Write a Toggle/Cycle Command