Skip to content
0:00 / 0:00

#emacs#abbrev-mode#abbreviations

Emacs: conditionally expand abbrev-mode definitions

Protesilaos

13K subscribers • 35 videos on Hallway

YouTube
  • Recommended by 1 person: 1 in engineering communities.
  • Presented by Protesilaos Stavrou

Intermediate. Assumes working knowledge.

2.1K views2 months ago1 recommendation

Tools and practiceVim, Emacs and editors

Protesilaos Stavrou shows how to add conditions to Emacs abbrev-mode definitions so they only expand in specific contexts.

In this ~15-minute video I show how to add conditions to 'abbrev-mode' abbreviations that you define. The idea is to have those abbrevs expand only in certain cases. I use three examples, which I think cover the common needs. The code I used is on my website: protesilaos.com/ codelog/2026-08-09-emacs-expand-abbrev-mode-definitions-conditionally/

Why it's here

1 person recommends this

What people say. Recommended as a helpful tutorial on customizing Emacs's built-in abbreviation expansion with conditions.

u/Informal_Sound_3039in r/emacs • Recommends

Prot new vid Emacs: conditionally expand abbrev-mode definitions Protesilaos new video on the title of # Emacs: conditionally expand abbrev-mode definitions