Emacs: Xah Emacs Lisp Mode

By Xah Lee. Date: . Last updated: .

xah-elisp-mode is a major mode for emacs lisp.

screenshot xah elisp mode 2017 01 03
screenshot emacs lisp mode 2017 01 03


Download here: https://github.com/xahlee/xah-elisp-mode

Also on MELPA http://melpa.org/#/xah-elisp-mode 〔►see Emacs: How to Install Packages Using ELPA, MELPA

For any problems, file a report on github, or comment here.


  1. Syntax coloring of ALL elisp symbols documented in elisp manual, and ONLY those. If a symbol is not colored, it's either a typo or not documented in elisp manual.
  2. Symbols are colored by their technical type: function, special form, macro, command, user option, variable.
  3. Completion for function names with `ido-mode' interface for ALL symbols emacs knows (all in obarray, including loaded 3rd party packages). (press Tab after word). Ido supports flex match. That is, you can type any char that appear in the middle of symbol you are looking for (not just prefix).
  4. Command to format entire sexp expression unit. (press Tab before word.)
  5. Function param template. (press Space after function name.)
  6. 1 to 4 letters abbrevs for top 50 most used functions. e.g. “d” → expands full (defun ...) template.

No dependency on third-party package. Only require bare GNU emacs.


Single-letter abbrevs includes:

Each one expands to the full function template. For example: m actually expands to (message "%s▮" ARGS)

Alt+x list-abbrevs to see the full list.

Yasnippt, Auto-Complete, Company Mode

xah-elisp-mode is designed to not need yasnippt or company-mode.

yasnippt or company-mode are are supported if you want to use them.


there are still some big tasks to do.

If you would like these features, different from traditional idea of line-based indentation, please do donate.

PayPal to 〔xah@xahlee.org〕. In the comment box, say “fund for elisp mode”.

or, Buy Xah Emacs Tutorial and add a comment “fund for elisp mode”.

Like it? Buy Xah Emacs Tutorial. Thanks.