I learned that GNU Emacs Manual

Most major modes fall into three major groups. The first group contains modes for normal text, either plain or with mark-up. It includes Text mode, HTML mode, SGML mode, TeX mode and Outline mode. The second group contains modes for specific programming languages. These include Lisp mode (which has several variants), C mode, Fortran mode, and others. The third group consists of major modes that are not associated directly with files; they are used in buffers created for specific purposes by Emacs. Examples include Dired mode for buffers made by Dired (see Dired), Message mode for buffers made by C-x m (see Sending Mail), and Shell mode for buffers used to communicate with an inferior shell process (see Interactive Shell).

Most major modes fall into three major groups of Text, Programming and File.

How could I retrieve a list of all the major modes equipped with my emacs.

  • See also stackoverflow.com/questions/5536304/… I think this question has no definite answer. Some major-modes are not in auto-mode-alist and some are not defined with define-derived-mode.
    – Tobias
    Commented Jul 12, 2019 at 2:52

1 Answer 1


To list major modes defined with define-derived-mode macro you can grep el files in emacs-source/lisp folder like grep -A 1 '(define-derived-mode' **/*.el

But maybe browsing built-in packages would be enough?

Those are with built-in status in the list provided by M-x package-list-packages.

Also finder-by-keyword which bound to C-h p will show packages grouped by keyword.

This one by @clemera: One can also check auto-mode-alist:

Alist of filename patterns vs corresponding major mode functions

  • One can also check auto-mode-alist
    – clemera
    Commented Jul 11, 2019 at 21:21
  • @clemera Awesome!
    – muffinmad
    Commented Jul 11, 2019 at 21:32

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.