Emacs: Xah Emacs Lisp Mode
xah-elisp-mode is a major mode for emacs lisp.
- Download here: https://github.com/xahlee/xah-elisp-mode
- Also on MELPA http://melpa.org/#/xah-elisp-mode [see Emacs: Install Package with ELPA/MELPA]
- 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.
- Symbols are colored by their technical type: function, special form, macro, command, user option, variable. • purple → special form. • blue → function. • green → command.
- 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).
- Command to format entire sexp expression unit. (press Tab before word.)
- Function param template. (press Space after function name.)
- 1 to 4 letters abbrevs for top 100 most used functions. e.g. “d” → expands to full template
No dependency on third-party package. Only require bare GNU emacs.
There are 100+ abbrevs, and ~440 function templates.
Each abbrev is 1 to 4 letters. Abbrev expands to full function name, then it expands to function template of that function.
For example, here's some of the single-letter abbrevs:
- d → defun
- i → insert
- l → let
- m → message
- p → point
- s → setq
- w → when
type “d”, press space, it become “defun”, press space again, and it becomes
(defun ▮ () "DOCSTRING" (interactive) (let (VAR) ))
list-abbrevs to see the full list.
Yasnippt, Auto-Complete, Company Mode
xah-elisp-mode is designed to not need yasnippt or company-mode.