Emacs: Abbrev and Templates for Emacs Lisp Mode

By Xah Lee. Date: . Last updated: .

This page used to be a set of abbrev and YASnippet templates for emacs-lisp-mode.

Now, i don't use YASnippet anymore. I just use emacs abbrev.

There are 4 hundred abbrevs and templates for elisp.

The first ~100 most frequently used functions has an abbrev. 〔➤see Emacs Lisp Function Frequency

Then, a full function name is expanded into the function template, with dummy arguments.

For example, type buffer-substring-no-properties , press Tab ↹, then it becomes (buffer-substring-no-properties START▮ END). Here's a picture of more examples, when used together with abbrev:

bsnp ▮
  ⇓
buffer-substring-no-properties▮
  ⇓
(buffer-substring-no-properties START▮ END)

Another example:

sfr ▮
  ⇓
search-forward-regexp▮
  ⇓
(search-forward-regexp "▮" &optional BOUND 'NOERROR COUNT)

Download

It's part of xah-elisp-mode at Emacs: Xah Emacs Lisp Mode

If you are not familiar with emacs's abbrev feature, see: Emacs: Abbrev Mode Tutorial.

back to Xah Emacs Packages

Like it? Buy Xah Emacs Tutorial. Thanks.

or, buy something from my keyboard store.