Skip to content

Instantly share code, notes, and snippets.

@davep
Created August 6, 2018 08:03
Show Gist options
  • Save davep/c16534ef91e9868aaff3d3658f880e4a to your computer and use it in GitHub Desktop.
Save davep/c16534ef91e9868aaff3d3658f880e4a to your computer and use it in GitHub Desktop.
Command to list all programming major modes know to an Emacs instance
(defun list-prog-modes ()
"List all programming modes known to this Emacs."
(interactive)
(with-help-window "*Programming Major Modes*"
(mapatoms (lambda (f)
(when (provided-mode-derived-p f 'prog-mode)
(princ f)
(princ "\n"))))))
@davep
Copy link
Author

davep commented Aug 6, 2018

Running the above in my current instance of Emacs gets this:

slime-xref-mode
prog-mode
rust-mode
idl-mode
web-mode
java-mode
c-mode
makefile-automake-mode
makefile-makepp-mode
pike-mode
python-mode
makefile-gmake-mode
awk-mode
hy-mode
js-mode
lisp-interaction-mode
scss-mode
js2-jsx-mode
powershell-mode
makefile-imake-mode
makefile-mode
elisp-byte-code-mode
css-mode
js2-mode
lisp-mode
c++-mode
emacs-lisp-mode
objc-mode
js-jsx-mode
makefile-bsdmake-mode

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment